question

SeongWeon HONG avatar image
0 Likes"
SeongWeon HONG asked SeongWeon HONG answered

how to replace Decision Points to Photo Eyes using FlexScript?

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


FlexSim 24.0.5
replace dp to pereplace object
· 1
5 |100000

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

Jason Lightfoot avatar image Jason Lightfoot ♦♦ commented ·

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 0 ·
Jason Lightfoot avatar image
1 Like"
Jason Lightfoot answered

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


5 |100000

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

SeongWeon HONG avatar image
0 Likes"
SeongWeon HONG answered

Hi @Jason Lightfoot

Thank you very much for your kind and thorough answer.

5 |100000

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