CalculateDistance

All topics on coding 4Dscript in Enterprise Dynamics.
Post Reply
manuel
Posts: 9
Joined: Monday 28 October, 2013 - 10:47

CalculateDistance

Post by manuel »

Hi,

does somebody know, how to use the CalculateDistance function of the AdvancedTransporter atom?
The function isn´t in the help file and i don´t know which parameters i got to use.

Thanks
Manuel
marlies
Posts: 301
Joined: Monday 17 January, 2011 - 09:28

Re: CalculateDistance

Post by marlies »

Hi Manuel,

Could you explain what you want to use this function for? This function is used internally by the advanced transporter, in other situations the function might not work. That's why it is not part of the help.

If you explain the situation, we might have another suggestion for you.

Regards, Marlies
manuel
Posts: 9
Joined: Monday 28 October, 2013 - 10:47

Re: CalculateDistance

Post by manuel »

I´m trying to get the distance between the transporter and his target on a net. The transporter has to drive for a certain timespan and i want to calculate the speed according to the time and distance.
marlies
Posts: 301
Joined: Monday 17 January, 2011 - 09:28

Re: CalculateDistance

Post by marlies »

Hi Manuel,

The distance between 2 nodes in a network can be read from the distance table which is the first table within the network controller atom.

When you check the labels of the nodes in the network and of the atoms where a node is connected you will see that these atoms have label called [t-node] this will help you to find the correct row and column in the distance table.

Find attached a small example that checks the distance to the destination when a product enters the advanced transporter.

Regards, Marlies
Attachments
20131029_AdvancedTransporterDistance.mod
(36.78 KiB) Downloaded 257 times
manuel
Posts: 9
Joined: Monday 28 October, 2013 - 10:47

Re: CalculateDistance

Post by manuel »

it works :D Thank you Marlies
Post Reply