hexagon logo

Command language - Access part mass dynamically

Hi,
I am just beginning with cmd language coding and have a newbie question.
 
I am using the function builder to test my code.
 
Let's say I have a part called VB in my model.
  1. If I go to the function builder, I can type "Model_1.VB.mass" and I will get the mass as output value.
  2. My problem is when I try to dynamically access this value. I type: eval(DB_CHILDREN(DB_DEFAULT(SYSTEM_DEFAULTS,"MODEL") ,"Part")[10]//".mass")
The result is the string I entered in bullet point 1- (see attached screenshots below).
Basically I want Adams to understand this as code and not as a string.
What am I doing wrong?
 
Thanks,
Chris
 
cmd
Parents Reply Children
No Data