Wednesday, January 18, 2012

Linking Orcad CIP parts to Innovator parts

OK in the last post I showed you how I connected to the CIP database and got my parts into Innovator.  My next step was to try to attach those parts to a regular innovator part.  Originally I thought I'd use those CIP PARTs we just created and make my own CIP BOM to contain all of them.   Then I'd like the CIP BOM to an Innovator Part.

Instead I ended up creating a CIP BOM, and overriding it's onGet function.   Then whenever a part called get for it's CIP BOM I return it the list of CIP PARTS that belong to it.   I keep that association in another table/item I created called CIP LOADED BOM (terrible naming conventions I used).   I use that CIP LOADED BOM part's form to load in a .csv bom file exported from Orcad Capture.

The downside of this approach, among other things, is that you can only update the Innovator part you attach your CIP parts to when you want to add a new BOM.  You can go from preliminary to released, but you can't say add an additional Innovator part to it because that will create a new version of your part, with a new id and that breaks my approach.   So in short I decided I'll always create a part like CT-BOM-000001 and it's only job will be to hold my Orcad BOM.   Hack hack hackity hack :)

First Steps
Alright my first step was to create a new item called CIP BOM, I just made a copy of Innovator's Part BOM item.   Then I added the CIP_BOM_GET method to the onGet Event.

Part Relationship
The next step was to create a relationship with an Innovator Part and my brand new CIP Part BOM.   To do that go edit the Part Item Type.  Then click on the RelationshipTypes tab.  Next select pick related and click the new button.   Now search for the CIP Part Bom part, add it and your window should look like this.

CIP PART BOM Relationship
I can't remember if this part is absolutely needed or not, but I'll include it here.  I edited the CIP Part BOM relationship to point to my CIP PARTS I created in another post.   The important part was to set the Source Item Type and Related Item Type correctly.

Now that all that is done you can go select an Innovator Part and you'll see a new tab called CIP Part BOM in the bottom pane.   This is where we'll see, but not add the associated CIP Parts for this Innovator Part.   You'll notice I made it the second tab, and I did that mainly for development work.   Innovator only calls the AML function to load that tab when you click on it.   So if you're trying to isolate why something doesn't work you can just load the part, click the tab and then you'll be able to see all the requests that were called for that tab.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.

No comments:

Post a Comment