Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Convert iAssembly/iPart to normal part

5 REPLIES 5
SOLVED
Reply
Message 1 of 6
Anonymous
1360 Views, 5 Replies

Convert iAssembly/iPart to normal part

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? 

5 REPLIES 5
Message 2 of 6
Anonymous
in reply to: Anonymous

Is this function available through API? 

 

Capture.PNG

Message 3 of 6
bradeneuropeArthur
in reply to: Anonymous

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:

Autodesk Software:Inventor Professional 2024 | Vault Professional 2022 | Autocad Mechanical 2022
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: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 !

Message 4 of 6
Anonymous
in reply to: bradeneuropeArthur

THANK you!

Message 5 of 6

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

Message 6 of 6
bindlmi
in reply to: C-Hoppen

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

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report