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: 

VBA to Break Link to Table

1 REPLY 1
SOLVED
Reply
Message 1 of 2
waynehelley
641 Views, 1 Reply

VBA to Break Link to Table

I have a VBA code which picks out an assembly to use as a template dependant on the users selections in a user form.

 

The problem is that the assemblys were created using iAssemblies, so they are member files and hence are linked to the table and unedittable until the link to the table has been broken,

 

Is there any VBA code to do this autonomously?? 

Wayne Helley
Inventor 2013 Certified Professional

Autodesk Inventor Professional 2023
Visual Studio 2022
Windows 10 Pro, 64-bit
1 REPLY 1
Message 2 of 2
YuhanZhang
in reply to: waynehelley

You can open the iAssembly member document and then use below VBA code sample to break the link:

 

Sub BreakLinkToFactorySample()
    Dim oDoc As AssemblyDocument
    Set oDoc = ThisApplication.ActiveDocument
    
    If oDoc.ComponentDefinition.IsiAssemblyMember Then
        oDoc.ComponentDefinition.iAssemblyMember.BreakLinkToFactory
    End If
End Sub

 



If this solves the problem please click ACCEPT SOLUTION so other people can find it easily.



Rocky Zhang
Inventor API PD
Manufacturing Solutions
Autodesk, Inc.

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

Post to forums  

Autodesk Design & Make Report