cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X

Simple script problem

LynnHales
1-Visitor

Simple script problem

I am about ready to scream (I don't have any hair to pull anymore). I want
to put a simple little script together that I can source, add to my popup
menu, and call when I want it. It will take the name of the an ENTITY from a
graphic attribute using the following command string

graphic_path = entity_path(oid_attr(oid_caret())

This works BEAUTIFULLY from the Epic command line (of course adding the $
before the variable name). However in this simple little script, it does not
work, the variable always returns nothing.

function graphic_info ()
{
graph_type = oid_graphic_format(oid_caret())
graph_path = entity_path(oid_attr(oid_caret(), boardno))
tag_name = oid_name(oid_current_tag())

eval "Graphic path - $graph_path\
Graphic type - $graph_type\
Current tag - $tag_name"

}


The variable $graph_type will show up in the output, but the path is blank.
I've even tried to narrow this down to just displaying the path using this:

eval entity_path(oid_attr(oid_caret(), boardno))

Again, this works from the command line, but not from the script.

I added the 'current tag' just to verify the script was reading the graphic
tag (which I knew it was because of the graphic type being returned).

Does anyone have any idea what is happening? I know I am no expert
programmer and like Ed I don't try to play one on TV either. I am skilled
enough to know this should work (and I have similar scripts that).

Many thanks.

Lynn
2 REPLIES 2

Hi Lynn,

the boardno parameter - is that the attribute name or another variable holding the attribute name? From what you are saying I would assume this is the attribute name. So I would try enclosing this in double quotes. I think Arbortext tries to interpret this as a variable name in the script.

Kind regards

Sirko

Sirko,



Thank you that was it. The 'boardno' is the attribute.

I might actually have gotten there had it not worked from the command line.



Lynn


Announcements

Top Tags