Copy features between parts via API

Copy features between parts via API

gerald_engineers
Participant Participant
390 Views
8 Replies
Message 1 of 9

Copy features between parts via API

gerald_engineers
Participant
Participant

 

Short about the situation
As part of its products the company where I am working manufactures sheet metals that differ a lot as they are manufactured according to customer requirements:

 

  • There is a base part which can differ in its dimensions and in this base parts a lot of different cuts are made.
  • The number of combinations of those cuts is quite huge and even their dimensions and numbers depend on the size of the base part.
  • It's not possible to put all features in one IPT file as
    • … it would be impossible to handle this file with all those features - this could be a real monster 😉
    • … and in addition it would be impossible that more than one engineer could change it at a time.

See even the attached image which shows the situation on small scale.

 

 

My idea for a workflow
  • A base part is created without any cuts.
    • It is parameterized with user parameters for its size.
    • Furthermore does it has work planes which have to be used as references for the derived parts (see next step).

  • Engineers can derive this base part and make cuts in the derived part.
    • In the sketches they relate to the predefined work planes.
    • They might even create some iLogic code to make adaptions to the cutout positions depending on the size of the plate.

  • For the manufacturing an external system talks to an addin which...
    • … makes a copy of the base part.
    • … adapt the size of this newly created part.
    • … opens all needed derived parts.
    • … copies the cuts (or other features) from this part to the newly created copy.

  • The result is a production-ready IPT file with the correct size and with all needed cuts.

 

My questions
I would like to test this with some proof-of-concept code but I have some questions:

  1. Is this a proper solution for the problem or are their better methods / best-practices?

  2. It is possible to copy (at least some) features from one part to another via GUI. But I can't find any code which shows how to do this via API. Is there some sample code out there?
  3. It seems to be impossible to copy flange features from one part to another. Is this an undocumented limitation?
0 Likes
Accepted solutions (1)
391 Views
8 Replies
Replies (8)
Message 2 of 9

batuhanozmen98
Enthusiast
Enthusiast

Hi,

 

IMO, to determine whether this is the proper solution, you need to provide more details about your design.

 

Im not sure about copying features but I do not recommend.

 

What I recomend is you should build the parts from base part via GUI since you know which features to add.

 

Edit: not GUI, via API

0 Likes
Message 3 of 9

gerald_engineers
Participant
Participant

Building via GUI is not an option as too many parts need to be created per week to serve the production machines. This needs to be automated.

0 Likes
Message 4 of 9

batuhanozmen98
Enthusiast
Enthusiast

Oh sorry I meant API

0 Likes
Message 5 of 9

gerald_engineers
Participant
Participant

Okay!

 

But where do shall the feature come from? Do you think the external system shall give the instructions?

This would mean that the features an engineer creates need to be abstracted and copied to an external system. This sound not either like a good workflow doesn't it? Or do you mean something different?

0 Likes
Message 6 of 9

batuhanozmen98
Enthusiast
Enthusiast

Kind of yes

 

You can extract the features (created by the engineer) from a part by reading it through the API, and then use that information to generate new parts.

 

Simple workflow: Once the engineer finishes designing the product(s), an API (running locally in Inventor) collects the relevant information and automatically creates new parts in the background. These parts are then saved to a shared storage location for production.

 

0 Likes
Message 7 of 9

gerald_engineers
Participant
Participant

Thanks for the response! 

I think I did not explain the problem good enough: 
The customer products are a result of multiple options whereas every options can have multiple variants. See the attached image. There are a big amount of options and a big amount of possible combinations.

 

That's why I want to copy features between parts.

Does this clarify the problem? 

0 Likes
Message 8 of 9

liminma8458
Collaborator
Collaborator

I have a solution of work flow for you. You need some API experience to develop the actual programming solution.

1. Use Excel file as a data base to include x-y location and cut type information, these hold the information of all the variation and combination of the cuts.

2. Use iLogic  or API to develop program to extract the Excel information into Inventor and also create these cuts in correct locations with right combination in the sheet metal panel based on the Excel information. 

It will save you tons of time for projects like yours.

Thanks
Limin
Inventor pro 2023 64 bit update 5.3; Windows 11 pro 64 bit version 24H2; Office 2013 64 bit

Download iCable in App Store to Create Cables Easily

0 Likes
Message 9 of 9

gerald_engineers
Participant
Participant
Accepted solution

I think I will try a kind of combination of the the two proposals:

1. After en engineer has finished the job some code will extract the features and write them into an database.

2. Via API those data will be inserted in a copy of a base file which via user parameters first gets the correct size and afterwards the needed features are inserted with data from the database.

 

Thank you for your support @batuhanozmen98 and @liminma8458!