The issue of ConveyorSystem on new DP‘s Position

The issue of ConveyorSystem on new DP‘s Position

565109852
Contributor Contributor
139 Views
4 Replies
Message 1 of 5

The issue of ConveyorSystem on new DP‘s Position

565109852
Contributor
Contributor

[ FlexSim 21.0.5 ]

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.

39703-the-issue-of-conveyorsystem-on-new-dps-position.png

DP create and setloc debugV21.0.5.fsm

0 Likes
Accepted solutions (1)
140 Views
4 Replies
Replies (4)
Message 2 of 5

JordanLJohnson
Autodesk
Autodesk
Accepted solution

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").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.

.


Jordan Johnson
Principal Software Engineer
>

Message 3 of 5

565109852
Contributor
Contributor

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.

39888-how-to-get-all-propertyname-of-the-object.png

0 Likes
Message 4 of 5

eric_m3
Not applicable

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.

40146-1622824697781.png

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).

40174-1622824925273.png

0 Likes
Message 5 of 5

565109852
Contributor
Contributor
Thanks a lot.
0 Likes