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
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
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! 🙂
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
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
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