Cancel
Showing results for 
Search instead for 
Did you mean: 

Assign a Variable for a Transporter

Pioneer
Pioneer

Is it possible to assign a variable value to a transporter number?

 

For Example:

 

n is a variable ------>  MUs.Transporter.(n.Value).Speed:=1

5 REPLIES

Re: Assign a Variable for a Transporter

Siemens Phenom Siemens Phenom
Siemens Phenom

Hi Pedro,

 

you can use the method 'ChildNo' to achieve this:

.MUs.Transporter.ChildNo(n).Speed := 1

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: Assign a Variable for a Transporter

Pioneer
Pioneer

Thank you, it almost worked.

In my model, the "n" inside ChildNo is the value of a variable, so i declared:

 

n:=VariableName.Value

.MUs.Transporter.ChildNo(n).Speed := 1

 

And it didn't work...it shows me the message:"the integer n cannot accept the method Value"

Do you know what i'm doing wrong?

 

 

 

Re: Assign a Variable for a Transporter

Siemens Phenom Siemens Phenom
Siemens Phenom

Just have a look at the attached model.

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: Assign a Variable for a Transporter

Pioneer
Pioneer
Thank you very much! It worked now!
I just started working with this software this week and i still have a lot to learn, but this forum has been very helpful Smiley Happy

Re: Assign a Variable for a Transporter

Solution Partner Phenom Solution Partner Phenom
Solution Partner Phenom

Pedro,

 

In most cases we use so-called anonymous identifiers to pinpoint the exact transporter we want to manipulate. In most cases we do not need to manage alle the children of a class.

The you get code lines like this:

@.Speed:=0.5
?.MU(1).Speed:=1

Check the Help-files, this is a very powerful concept.


Gert Nomden
Senior Consultant | Tecnomatix Product Manager
cardsplmsolutions.com