Cancel
Showing results for 
Search instead for 
Did you mean: 

Number of transporters located on part of a track

Pioneer
Pioneer

Hi Guys,

 

I'm wondering whether it is possible to get the number of transporters located on a certain part of a track, e.g. the first 200 meters of a 1000 meter track?

 

Regards,

 

William

2 REPLIES

Re: Number of transporters located on part of a track

Siemens Phenom Siemens Phenom
Siemens Phenom

Hi WilliamK,

 

you can use the following SimTalk code to get what you want:

is
do
	local contList := Track.contentsList;
	
	local count:integer;
	
	for local i := 1 to contList.ydim loop
		if contList[2, i] > 200 then
			count := count + 1;
		else
			exitLoop;
		end;
	next;
	print count;
end;

 But please keep in mind that the performance may suffer if you execute this very often.

 

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: Number of transporters located on part of a track

Pioneer
Pioneer

Thank you!