I used to work on Vantage’s ODBC, and I’m familiar with the way things were done back then, but now everything is going through the REST API, and I’m a bit off my rockers.
So, in the old system, you would insert a row in the PartMtl table, with all the trimmings, and life was good.
I’m trying to find what the equivalent is nowadays in the REST world. The use case is very basic (and, showing my progress so far):
Make sure a Part exists (get or create)
Make sure a PartRev exists (get or create)
Add a bunch of PartMtl to that PartRev
In the API’s PartSvc, are PartSubs the same as PartMtl, just a different name, or are they something else entirely?
You’ll need to mimic the way you would do it manually at the screen. A user cannot add materials directly to a part and/or rev in V8+. They need to go through the Engineering Workbench. Turn on tracing, Checkout a reve (or create one), add PartMtl through the Workbench, check in your Rev and you’ll see what Business Objects are used and then just mimic that pattern.
Add/Update/Delete Parts and/or operations (These tables are the same as the source tables bit begin with ECO)
Approve the Revision
Check In
Turning on the trace and running this sequence will show you what to do. You may also find the BLTester helpful. This tool has been around since the V8 days and let’s you manipulate calls in real-time and shows you the required parameters and result sets.
Kevin,
I have had success importing BOMs from CAD using the REST API.
First, use the PartSvc to create the Part and Revision if necessary.
Create Part - PartSvc (OData Post)
Create Part Rev - PartSvc/PartRev (OData Post)
After Part and Revision are created, use EngWorkBenchSvc to perform the steps normally done in Engineering Workbench. Some use the Custom Methods, some OData. I’ve found OData to be simpler to deal with because you don’t need to work with an entire dataset, but some commands are only possible via the Custom Methods.
Create ECO Group - EngWorkBenchSvc (OData - Post)
Check Out Revision - EngWorkBenchSvc (Custom Methods - CheckOut )