Cancel
Showing results for 
Search instead for 
Did you mean: 

Reference to object via name (SIMTALK)

Pioneer
Pioneer

Hello all,

 

I'm coming around with a near-weekend-problem.

 

I would like to create an object in a sub-assembly. This should be done by referencing the sub-assembly by its name. The names of sub-assemblies are stored in a table (in the first column).

 

I'm currently thinking of a loop likely to this one:

 

for i := 1 to table.ydim loop

  .Materialflow.Singleproc.createObject(.Models.Network.%NAME FROM TABLE%, 20, 20)

next;

 

That sort of doesn't work. Is there a way to use strings as arguments in the createObject method?

 

Thanks already for reading

 

Tim

2 REPLIES

Re: Reference to object via name (SIMTALK)

Siemens Phenom Siemens Phenom
Siemens Phenom

 

Hi Tim,

 

you can use the following syntax:

 

.Materialflow.Singleproc.createObject(.Models.Network.extendPath("Test"), 20, 20)

 

Regards,

Ralf

 

 

Regards,

Ralf
------------------------------------------------------------------------------------------------------
Did you like the answer? Then click the Thumbs Up button.
Did the answer solve your problem? Then accept the answer as solution.

Re: Reference to object via name (SIMTALK)

Pioneer
Pioneer

Wonderful, thanks a lot.