question

Bo.W avatar image
0 Likes"
Bo.W asked Bo.W commented

The issue of ConveyorSystem on new DP‘s Position

hi,

Why are the positions of two DPs different after refreshing? Is there any way that decision point 1 can also be associated with conveyor 2 instead of conveyor 1. Is this the bug of the ConveyorSystem? The test results of 21.0.2 and 21.0.5 are the same.

DP create and setloc debugV21.0.5.fsm

FlexSim 21.0.5
conveyorsystemflexsim 21.0.5dp
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

Jordan Johnson avatar image
1 Like"
Jordan Johnson answered Bo.W commented

Instead of using function_s, use setProperty:

Group newGroup = Group("newGroup");
if( objectexists( Group("newGroup") ))
{
	for(int i = newGroup.length; i > 0 ; i--){
		Group("newGroup")[i].as(Object).destroy();	}
}

Object conveyor = createinstance( library().find("/?StraightConveyor"), model());
conveyor.location.y = 1.5;

newGroup.addMember(conveyor);

Object decisionPoint = createinstance(library().find("/?DecisionPoint"), model());
decisionPoint.setProperty("Location", conveyor.getLocation(0.5, 0.0, 0.0));
decisionPoint.setProperty("DistAlongConveyor", 1.0);

newGroup.addMember(decisionPoint);


conveyor = createinstance( library().find("/?StraightConveyor"), model());
conveyor.location.y = 0;
newGroup.addMember(conveyor);
decisionPoint = createinstance(library().find("/?DecisionPoint"), model());
newGroup.addMember(decisionPoint);
decisionPoint.setProperty("Location", conveyor.getLocation(0.5, 0.0, 0.0));
decisionPoint.setProperty("DistAlongConveyor", 1.0);

To associate a decision point with a specific conveyor, use setProperty to set it's location to the conveyor's location. Then use setProperty to set the DistAlongConveyor.

· 3
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Bo.W avatar image Bo.W commented ·

Thank you very much for your reply.

By the way,is there anyway to get the list of available propertyName of the Object ? With selected the method "setProperty" , Through the F1 key to enter the interface and I can not find the relevant entrance, So I would like to ask what method can find the list or something in User Manual.

0 Likes 0 ·
Eric M avatar image Eric M Bo.W commented ·

Hi, are you asking what properties are available to change? One way is by looking at the object's tree as explained in this answer. Another good resource is to use the property table feature to see what properties can be changed / what their names are. You can access it by clicking on this icon in the properties of an object.

Then you can click the icon on the upper left to bring up a menu that has a lot of different properties. You can use setProperty with the name of these properties to set it through code (you can see the property "MaxContent" is on the list).

0 Likes 0 ·
1622824697781.png (8.6 KiB)
1622824862931.png (17.5 KiB)
1622824925273.png (17.6 KiB)
Bo.W avatar image Bo.W Eric M commented ·
Thanks a lot.
0 Likes 0 ·