Plane subnode's info

Plane subnode's info

s1125413
Advocate Advocate
344 Views
6 Replies
Message 1 of 7

Plane subnode's info

s1125413
Advocate
Advocate

Hello FlexSim community and @moehlmann_fe 

I want to get the Coordination of the copied object on the plane, but it seem the sytax error to the "obj.subnodes[i].location.x", is any way to implement the function?

 

Thank you in advance.

s1125413_0-1756126245784.png

 

 

0 Likes
345 Views
6 Replies
Replies (6)
Message 2 of 7

moehlmann_fe
Advocate
Advocate

You have to tell the compiler that it should treat the subnode as an Object. Otherwise "location" is treated as a label name.

obj.subnodes[i].as(Object).location.x

 

Message 3 of 7

joerg_vogel_HsH
Mentor
Mentor

You start with a model plane called "DIP".

You press dashboard button "produce";

A copied plane is created.

Hard coded you get first member of group processor location of x and y coordinates, which you write into Table "Info" in row = 1 and columns 1 and 2.

You do not reference last of group, nor you want data of processor to a different reference rather than the plane.

This look quite right. Most important is, that you start with at least on plane called "DIP" in your model.

Each new plane more than a first copied plane gets an extension "~#". where # is a number rising by one each time you press button produce thereafter.

Message 4 of 7

s1125413
Advocate
Advocate

Thank you @joerg_vogel_HsH @moehlmann_fe , I successfully received the coordination, but there are two issues:

 

1.The copied model's TaskExecuter didn't work. The processor is ignoring the 'Use transporter to pass item directly' setting.

2.I collected all object information on the copied plane, but I only need the information for FixResources and conveyors. Is there another way to delete the unnecessary information or implement this?

s1125413_0-1756188756859.png

s1125413_1-1756188780820.png

 

 

0 Likes
Message 5 of 7

joerg_vogel_HsH
Mentor
Mentor

Wouldn’t it be easier you put needed objects into a group or a list, instead of filtering all objects?

Message 6 of 7

moehlmann_fe
Advocate
Advocate

1. The processor isn't ignoring the "Use Transport" setting. The TE is not assigned to any navigator but set to "Use Navigator For Offset Travel". It does receive the item but doesn't travel anywhere due to the lacking navigator. You'd need to add it to the AGV network when copying the plane and its contents.

2. Your approach of checking the (super)class is fine. The condition needs fixing though. The removeRow() command needs an argument to now what row to remove. Instead of adding a row for each subnode and later deleting them, I would only create rows for 'valid' objects in the first place.

Message 7 of 7

s1125413
Advocate
Advocate

Thank you so much @moehlmann_fe 

1. I'm setting the button function to produce and eliminate the copied process, but sometimes it can produce successfully, and other times it can't display the copied object in the model, showing an error like the one in pic1. Repeatedly pressing the produce and eliminate button might resolve the issue, or it may continue to show the error. Is this error related to the issue mentioned above?

 

2.Based on your model, since there are many CPs and AGVs in mine, is there a way to build the connectors using a loop?

 

pic1.

s1125413_1-1756704663213.png

 

 

pic2

s1125413_1-1756476202897.png

 

 

0 Likes