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: 

Export Sketch As AutoCAD Dwg file Question

1 REPLY 1
Reply
Message 1 of 2
isocam
256 Views, 1 Reply

Export Sketch As AutoCAD Dwg file Question

Can  anybody help?

 

I have the following VBA code to export a "Sketch" as a AutoCAD Dwg file.....

 

   Dim DWGAddIn As TranslatorAddIn

       Set DWGAddIn = ThisApplication.ApplicationAddIns.ItemById("{C24E3AC2-122E-11D5-8E91-0010B541CD80}")

       Set Doc = ThisApplication.ActiveDocument

       Dim transObjs As TransientObjects

       Set transObjs = ThisApplication.TransientObjects

       Dim context As TranslationContext

       Set context = transObjs.CreateTranslationContext

       context.Type = kFileBrowseIOMechanism

       Dim options As NameValueMap

       Set options = transObjs.CreateNameValueMap

       If DWGAddIn.HasSaveCopyAsOptions(Doc, context, options) Then
          options.Value("Sketch") = True

          options.Value("DwgVersion") = 25
       End If

       Dim oDataMedium As DataMedium

       Set oDataMedium = transObjs.CreateDataMedium

       oDataMedium.FileName = DwgFileName

       Call DWGAddIn.SaveCopyAs(Doc, context, options, oDataMedium)
    End If

 

The AutoCAD Dwg file is exported as a 3d solid!

 

How can I export the "Sketch" so that it exports a AutoCAD 2d (Lines/Arcs/Circles) ready for laser cutting?

 

Any help would be great!!!!

 

Many thanks in advance.

 

Darren

1 REPLY 1
Message 2 of 2
salariua
in reply to: isocam

Have spoken too soon. Shoud have beeter read your question.

Adrian S.
blog.ads-sol.com 

AIP2012-2020 i7 6700k AMD R9 370
Did you find this reply helpful ?
If so please use the Accepted Solutions or Like button - Thank you!

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

Post to forums  

Autodesk Design & Make Report