cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X

Translate the entire conversation x

Can anyone provide a good example of the dg_inherit_from_connected function?

PetePickettII
14-Alexandrite

Can anyone provide a good example of the dg_inherit_from_connected function?

There is very little documentation on this.  

 

I have a simple block (in wiring diagram) with 5 ports on it.  Each port has a Label attached to it (labels are not attached to the block but to the ports)

 

I run single fibers to each port.  I want the Port to grab the "color" parameter (or any parameter) from the wire and that calculated parameter will be pushed to the text label.  It should be easy right?

 

Thanks in advance! 

Patiently waiting....

baby-yoda-soup.jpg

4 REPLIES 4

Hello Pete,

 

Here is the parameter you need to create :

 

SoretteMichel_1-1620044630992.png

 

SoretteMichel_0-1620044460271.png

the first attribute (forward/reverse) is not important here as the wire color does not depend on the fiber orientation

the second attribute defines the type of diagram you're using

the third defines the name of the parameter you want to collect from the wire

the last parameter is set to 0 so the system search the color on the highest member of the connected object (does not matter here as we only have simple wires connected

 

Once this parameter is created, simply add it to the ports of your connector and make sure the checkbox to calculate the value is checked.

 

Hope this clarifies the definition

Hey, if you're still on here, do you know when you'd actually use forward/reverse?  I'm trying to pull the names from the two ports a fiber is connected to using dg_inherit_from_connected(forward, wiring, name, 1) and dg_inherit_from_connected(reverse, wiring, name, 1), and both are just giving me the same value from the port at the origin of the fiber.  Any help would be appreciated.  Thanks!

You need to make sure that the fiber has an orientation (double click on it then you should see a menu to activate the fiber orientation or to reverse it if already oriented : 

 

SoretteMichel_0-1758874431763.png

 

SoretteMichel_1-1758874494307.png

Hope this helps

 

This solved my issue!  Thanks a ton!

Announcements



Top Tags