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: 

Ilogic dwf export

4 REPLIES 4
Reply
Message 1 of 5
Anonymous
1573 Views, 4 Replies

Ilogic dwf export

Hello!


I have problems to export dwf with ilogic

I use parts of the snippets than ships with inventor, but I can not export the 2d and 3d in the same dwf.

Perhaps it might have something to do with that when I export a 2d file the traditional way only 2d gets exported to the dwf if i dont open the tab that lets you choose 2d and 3d model.

Even if i have the 3d model checked i have to open the tab to get both 2d and 3d, if i dont open the tab only 2d

Here is the code.

 

Thank you!

 

path_and_name = ThisDoc.PathAndFileName(False)

DWFAddIn = ThisApplication.ApplicationAddIns.ItemById("{0AC6FD95-2F4D-42CE-8BE0-8AEA580399E4}")

oDocument = ThisApplication.ActiveDocument

oContext = ThisApplication.TransientObjects.CreateTranslationContext

oContext.Type = IOMechanismEnum.kFileBrowseIOMechanism

oOptions = ThisApplication.TransientObjects.CreateNameValueMap

oDataMedium = ThisApplication.TransientObjects.CreateDataMedium

 

 

           If DWFAddIn.HasSaveCopyAsOptions(oDataMedium, oContext, oOptions) Then

                      oOptions.Value("Launch_Viewer") = 0

                      oOptions.Value("Publish_All_Component_Props") = 1

                      oOptions.Value("Publish_All_Physical_Props") = 1

                      oOptions.Value("Password") = 0

 

                                 If TypeOf oDocument Is DrawingDocument Then

 

                                            Dim oSheets As NameValueMap

                                            Dim oSheet1Options As NameValueMap

 

                                            oSheets = ThisApplication.TransientObjects.CreateNameValueMap

                                            oOptions.Value("Publish_Mode") = DWFPublishModeEnum.kCustomDWFPublish

                                            oOptions.Value("Publish_All_Sheets") = 1

 

                                            oSheet1Options = ThisApplication.TransientObjects.CreateNameValueMap

                                            oSheet1Options.Add("Name", "Sheet:1")

                                            oSheet1Options.Add("3DModel", True)

                                            oSheets.Value("Sheet1") = oSheet1Options

 

                                 End If

           End If

 

oDataMedium.FileName = path_and_name & ".dwf"

 

Call DWFAddIn.SaveCopyAs(oDocument, oContext, oOptions, oDataMedium)

 

If MessageBox.Show("Öppna?", "doDwf",MessageBoxButtons.YesNo) = vbYes Then ThisDoc.Launch(path_and_name & ".dwf")

 

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

Does anyone have a clue?  

I still cant get it to work.

Message 3 of 5
s.mccarthy
in reply to: Anonymous

Anyone there....??? Any response would be better than no response, don't you think??

Message 4 of 5
henrikubbe4438
in reply to: Anonymous

Message 5 of 5

I think that post answers this question. i.e. Publish_3D_Models is an option to export 3D model or not. 

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

Post to forums  

Autodesk Design & Make Report