how to replace Decision Points to Photo Eyes using FlexScript?

how to replace Decision Points to Photo Eyes using FlexScript?

hong_seongweon
Participant Participant
24 Views
3 Replies
Message 1 of 4

how to replace Decision Points to Photo Eyes using FlexScript?

hong_seongweon
Participant
Participant

[ FlexSim 24.0.5 ]

how to replace Decision Points to Photo Eyes using FlexScript?

Or is there another way without using FlexScript?


how-to-replace-dp-to-pe.png


0 Likes
Accepted solutions (1)
25 Views
3 Replies
Replies (3)
Message 2 of 4

jason_lightfootVL7B4
Autodesk
Autodesk
Accepted solution

Here's an example to try - it uses a user command 'getDPlocation' a temporary Global Table called "DPinfo" and this script:

Table t=Table.query("SELECT getDPlocation(Object) AS Location, Container, Class, DistAlongConveyor, Container, 'Conveyor::PhotoEye' AS NewClass FROM Objects() WHERE Class='Conveyor::DecisionPoint'");
t.cloneTo(Table("DPinfo"));
Table.query("DELETE FROM Objects() WHERE Class='Conveyor::DecisionPoint'");
Table.query("INSERT INTO Objects() (Class, Container,Location,DistAlongConveyor) SELECT NewClass, Container, Location, DistAlongConveyor FROM DPinfo");


ReplaceDPsWithPEs.fsm

Message 3 of 4

jason_lightfootVL7B4
Autodesk
Autodesk

Hi @SeongWeon HONG,

Thank you for contributing to our community! We couldn't identify a maintained license or subscription linked to your account.

You may need to update your profile information to identify yourself as a license owner or their associate. Check out our article for how to ensure you receive timely support. If you update your profile comment back to let us know - we'll adjust the priority of your post accordingly.

If your current license is expired, please contact your local distributor to renew.

0 Likes
Message 4 of 4

hong_seongweon
Participant
Participant

Hi @Jason Lightfoot

Thank you very much for your kind and thorough answer.

0 Likes