How to create a shrinkwrap face for a part in the Inventor 2021 API?

How to create a shrinkwrap face for a part in the Inventor 2021 API?

ss13953642009
Advocate Advocate
120 Views
2 Replies
Message 1 of 3

How to create a shrinkwrap face for a part in the Inventor 2021 API?

ss13953642009
Advocate
Advocate
Hello everyone, in the Inventor 2021 API, how can we create a shrinkwrap face for an assembly? From checking the API documentation, it seems that the PartComponentDefinition.ReferenceComponents.ShrinkwrapComponents.CreateDefinition() method is used, but this is for parts. I would like to know how to directly create a shrinkwrap face for an assembly.
0 Likes
Accepted solutions (1)
121 Views
2 Replies
Replies (2)
Message 2 of 3

WCrihfield
Mentor
Mentor
Accepted solution

Hi @ss13953642009.  This is honestly something that I did not do/use where I work, so slightly unfamiliar to me, but I believe I understand the concept and reasons for it.  I believe you were on the right track, but more steps would be required along the way, to accomplish what you are wanting to do.

You could likely benefit from the following online help 'Sample' code, pulled from the 2021 online help area.

Shrink wrap substitute in assembly API Sample 

That 'sample' is in VBA (not vb.net framework, which is used by iLogic rules) , so could not be used directly used in an iLogic rule, without a few minor tweaks/changes.  But it is a good reference anyways.  In that example, it is creating a new PartDocument with the 'other' assembly derived into it as a reference assembly component, instead of as a shrink wrap component, but the process is pretty similar.  You could likely go the same route you mentioned in your first post to replace that step.  Then the last step, creating a new 'substitute' LOD in the assembly, and setting that new part as the 'other' assembly's substitute should be pretty much the same also.

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes
Message 3 of 3

ss13953642009
Advocate
Advocate

Thank you very much! With the help of your response, I successfully achieved the functionality I was aiming for.

0 Likes