question

Martin K5 avatar image
0 Likes"
Martin K5 asked Martin K5 commented

ControlPoint creation problem.

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

FlexSim 21.1.4
codecontrol pointspath
cp-pokus.fsm (28.8 KiB)
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

Roi Sánchez avatar image
0 Likes"
Roi Sánchez answered Martin K5 commented

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

  1. function_s(controlPoint, "finalizeSpatialChanges");


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