ControlPoint creation problem.

ControlPoint creation problem.

martin_k5
Not applicable
18 Views
4 Replies
Message 1 of 5

ControlPoint creation problem.

martin_k5
Not applicable

[ FlexSim 21.1.4 ]

Hi,

I am trying to create ControlPoint by code. The thing I want to make is to create ControlPoint in the same way as I can do manually by dragging the controlPoint and placing it exactly on the created Path, in this moment the controlPoint will have little cross inside him (a visual mark that the controlPoint lays exactly on the path). When I do this by code (creating an instance) and setting up the location of that controlPoint to be on the same path, but here the problem occurs. The controlPoint has the y-location as the path does, but the little cross does not appear. Only after moving manually with the controlPoint the little cross appears. I am dealing with this because I am creating the whole model by code and then the AGV network does not work because the controlPoint is not "connected" properly and you need to move it as I said a little and then the cross appears and everything works fine. I have attached the model with script to see what I meant.

Did anyone deal with this problem?

Thank you.


cp_pokus.fsm

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

roi_sn
Not applicable
Accepted solution

Try to run this line of code after creating the control point, where the first argument is the control point treenode:

function_s(controlPoint, "finalizeSpatialChanges");


0 Likes
Message 3 of 5

martin_k5
Not applicable
Hi,

yes, I tried this code in the model that I attached and it works nicely. But when I try it in the bigger model it does nothing, but I has the same structure as I have here. What I do there is to create instance of the Control Point, set his location to be on the path that I want, then I create the connection to the rack and than I applied the code that you posted and it is still without the crossing and the AGV network does not work.

Thank you,

0 Likes
Message 4 of 5

Matthew_Gillespie
Autodesk
Autodesk
@Martin K5 Can you attach a sample model that demonstrates the issue?


Matthew Gillespie
FlexSim Software Developer

0 Likes
Message 5 of 5

martin_k5
Not applicable

When I used this line of code in another script (with finding the object that I want to finalize), it does work.

Thank you

0 Likes