Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
Anonymous
551 Views, 3 Replies

Export part flatpattern or selected face add in.

Good Day

 

i'm very new to Inventor customizing. I've created an Add-in for inventor with Visual Studio 2015 and VB.net. I want to export the flatpatter or selected face by buttons in my PartRibbon Panel.

 

I've created the buttons.

 

And added afunction tothe first button to export the flat pattern.(It works fine)

 

Private Sub FlatPatternExport_OnExecute() Handles FlatPatternExport.OnExecute
            Dim oDoc As PartDocument = m_inventorApplication.ActiveDocument
            Dim oDataIO As DataIO = oDoc.ComponentDefinition.DataIO
            oDataIO.WriteDataToFile("FLAT PATTERN DWG?AcadVersion=2000&OuterProfileLayer=IV_OUTER_PROFILE",_                m_inventorApplication.ActiveDocument.FullFileName & ".dwg")
       End Sub

 

 

Question 1

Now i want to add a function to the other button, when clicked it will export the selected face to dwg in the same manner as above?But i am clueless, searched all over the internet.

This is what i have

Private Sub SelectedFaceExport_OnExecute() Handles SelectedFaceExport.OnExecute
            Dim oDoc As PartDocument = m_inventorApplication.ActiveDocument
            Dim oDataIO As DataIO = oDoc.ComponentDefinition.DataIO
            oDataIO.WriteDataToFile("Face Loops DWG?AcadVersion=2000&OuterProfileLayer=IV_OUTER_PROFILE", m_inventorApplication.ActiveDocument.FullFileName & ".dwg")

Question 2

How do i only export the outer profile layer and bend line layer. When i open the DWG in AutoCAD i have to put off the layers i don't want.

 

Thanks

Wessel

 

 

Anonymous
in reply to: Anonymous

Answered

xenocatalyst
in reply to: Anonymous

Hi

 

I've been wanting to export a face as dxf via ILogic for a while but all the information I can find seems incomplete.

 

Could you please post the full working code for me to use?

 

And does your code require a button, or can it be run as an external rule?

Anonymous
in reply to: xenocatalyst

You can can contact me on "woosthuizen at oddy dot co dot za"

 

Please send me an e-mail and we talk about the add in.

 

Wessel