AutoCAD Electrical Forum
Welcome to Autodesk’s AutoCAD Electrical Forums. Share your knowledge, ask questions, and explore popular AutoCAD Electrical topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Locating Parent Componet from Child Component

5 REPLIES 5
Reply
Message 1 of 6
keithjk
511 Views, 5 Replies

Locating Parent Componet from Child Component

Is there an Elecitrcal API call that will find the parent component when a child component is selected?  I know the 2 are linked by the tag value.  I can write something in LISP to find the parent but I don't want to recreate the wheel if I don't need to.

 

Thanks

5 REPLIES 5
Message 2 of 6
CAD-ICE
in reply to: keithjk

Hi there,

why dont you use the surfer?

By right clicking on the child component and selecting surf will show all references of the selected component including the parent component.

Regards, Gary

Message 3 of 6
keithjk
in reply to: keithjk

I should have explained my question better but thanks for the answer.

 

I am creating a custom application that includes determining the catalog number of a child component (which isn't an attribute or xdata in a child).  However, I solved the problem by grabbing the TAG2 value of the child component, and then querying the COMP table (from the project database) for the matching tag of the parent component.  That record contains the catalog number and problem solved! 🙂

Message 4 of 6
CAD-ICE
in reply to: keithjk

This sounds interesting. Are you doing this to show this information on drawings or what´s the purpose?

I would like to know more about working with API and how to create custom applications, do you have any recommendations on litterature that could help me on my way?

Regards, Gary

Message 5 of 6
keithjk
in reply to: CAD-ICE

Gary,

 

WIthin AutoCAD Electrical, select Electrical Help and then API Help.  The API help includes most of the custom AutoCAD Electrical functions that you can use.  If you are experienced in LISP, you can then create some really nice custom commands to tailor your needs.

 

Keith

Message 6 of 6
keithjk
in reply to: keithjk

Gary,

 

Forgot to answer your other question...

 

The purpose is to show the wire gauge ranges and torque settings on some of our components.  The program that I have written allows the user to select a component, then the program looks the catalog number up in the default_cat.mdb file (which I have modifed with various specs for each part).  Since the user sometimes will select a child component, I needed a way of determining the catalog number.

 

Keith

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost