Convert iAssembly/iPart to normal part

Anonymous

Convert iAssembly/iPart to normal part

Anonymous
Not applicable

Is it possible to convert iAssembly/iPart factory to normal assembly using iLogic? 

 

I've found the way to delete single rows and columns, but how can I delete the entire Table? 

0 Likes
Reply
Accepted solutions (1)
1,429 Views
5 Replies
Replies (5)

Anonymous
Not applicable

Is this function available through API? 

 

Capture.PNG

0 Likes

bradeneuropeArthur
Mentor
Mentor
Accepted solution
Dim a As Application
Set a = ThisApplication

Dim b As PartDocument
Set b = a.ActiveDocument


Dim c As iPartFactory
Set c = b.ComponentDefinition.iPartFactory
c.Delete

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

0 Likes

Anonymous
Not applicable

THANK you!

0 Likes

C-Hoppen
Advocate
Advocate

Hello

the code works well with iParts. Deleting an iAssembly table always always throws an exception.

 

 

Inventor.AssemblyComponentDefinition assmDef = assmDoc.ComponentDefinition;

            if (assmDef.IsiAssemblyFactory)
            {
                Inventor.iAssemblyFactory factory = assmDef.iAssemblyFactory;

                factory.Delete(); // throws an exception

...
}

Is there any solution?

 

Regards

 

Christoph

 

Edit: Second try with vba:

 

image.png

0 Likes

bindlmi
Advocate
Advocate

Hi,

 

not sure, if you still need help, but I had the same problem. The problem were excluded ComponentOccurrences in the iAssembly. Delete them or include them before deleting the iAssemblyFactory and you're fine.

 

Regards

Michael

0 Likes