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: 

DWF(X) Publish Settings 2014

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
noontz
1481 Views, 4 Replies

DWF(X) Publish Settings 2014

Hi.

 

This seems to be a reoccurring topic and for a good reason I believe 😉

 

According to THIS "These options are published in programming help" in the 'Translator Addin - export to DWF" sample.

 

Searching the samples I find two identical samples "Export to DWF" & "Save as DWF Translator Sample". I only see 7 options in this sample. If the message is referring to another sample please guide me, because using THIS I find a list of 40 options:

 

1 : Publish_All_Sheets   0
2 : Publish_3D_Models   0
3 : Launch_Viewer   1
4 : Password   
5 : Publish_Mode   62723
6 : Enable_Large_Assembly_Mode   0
7 : Enable_Measure   1
8 : Enable_Printing   1
9 : Enable_Markups   1
10 : Enable_Markup_Edits   1
11 : Output_Path   
12 : Include_Sheet_Tables   1
13 : Sheet_Metal_Flat_Pattern   0
14 : Sheet_Metal_Style_Information   0
15 : Sheet_Metal_Part   1
16 : Weldment_Preparation   0
17 : Weldment_Symbol   0
18 : BOM_Structured   1
19 : BOM_Parts_Only   1
20 : Animations   0
21 : Instructions   0
22 : iAssembly_All_Members   0
23 : iAssembly_3D_Models   0
24 : iPart_All_Members   0
25 : iPart_3D_Models   0
26 : Publish_Component_Props   1
27 : Publish_Mass_Props   1
28 : Include_Empty_Properties   0
29 : Publish_Screenshot   0
30 : Screenshot_DPI   96
31 : Facet_Quality   69379
32 : Override_Sheet_Color   0
33 : Sheet_Color   0
34 : Sheet_Range   14081
35 : Custom_Begin_Sheet   1
36 : Custom_End_Sheet   -1
37 : All_Color_AS_Black   0
38 : Remove_Line_Weights   0
39 : Vector_Resolution   400
40 : TranscriptAPICall   0.

 

In the API documentation sample there is an item in the "oOptions" named "Sheets" apparently with a Value of type (nested) NamedValueMap. Why do not see this option in my list above?

 

According to THIS supporting individual properties was added to the tracking system 4½ years  ago. I would assume they are implemeted by now, but how do we reach them via API?

 

Saved settings are often a good guide on options, but where does Inventor store the publish settings from a user "export to dwf" session?

 

Does a complete updated documentation of the DWF(X) Translator Addin exist? Something like Sanjay provides HERE ?

 

Thanks!

4 REPLIES 4
Message 2 of 5
adam.nagy
in reply to: noontz

Hi,

 

There are 42 options now 🙂 and you can get the list like this:

http://adndevblog.typepad.com/manufacturing/2012/08/get-an-inventor-translator-save-options.html

 

Cheers,



Adam Nagy
Autodesk Platform Services
Message 3 of 5
noontz
in reply to: adam.nagy

Hi Adam..

 

Thanks for listening!! Guess Barbara read Waynes post 😉

 

 

And yes 2 more options in 2014 (Force_Facet_Recompute & Facet_Recompute_Tolerance), compared to 2013, but besides this and two value changes, I end up with the exact same list as before and all my questions unanswered?

Message 4 of 5
adam.nagy
in reply to: noontz

Hi,

 

I'm not aware of a more complete sample and I could not find a description either about all the options.

But since it's so easy to get all the options, I'm not sure it's necessary.

 

If you call ShowSaveCopyAsOptions then apart from making sure that all options are listed (inc. "Sheets"), you also have the chance to adjust the properties through the Options dialog of the translator and then check programmatically how those settings got stored in the Option NameValueMap

 

I've updated Barbara's blog post - as a result it got a new URL: http://adndevblog.typepad.com/manufacturing/2014/02/get-option-names-and-values-supported-by-invento...

 

Looks like you still can only control property parameters by category. 

 

You can use tools like Process Monitor (http://technet.microsoft.com/en-gb/sysinternals/bb896645.aspx) to see what files and registry settings are being accessed by a program. So if you use that when changing DWF options, then you'll find it's stored in the registry under "HKEY_CURRENT_USER\Software\Autodesk\Inventor\RegistryVersion18.0\Translators\DWFTranslator\AllOptions" (in case of Inventor 2014, v18). Looks like the setting names in the registry and in the Option NameValueMap are not the same.

 

Cheers, 



Adam Nagy
Autodesk Platform Services
Message 5 of 5
noontz
in reply to: adam.nagy

Hi Adam.

 

Big Thanks!!  ShowSaveCopyAsOptions was the missing link & that link to the registry is much appreciated!!

 

Here´s the working code in C# assuming references to a running inventor (myInventor)  and an open document (myDoc)

 

var dwfAddIn = myInventor.ApplicationAddIns.ItemById["{0AC6FD95-2F4D-42CE-8BE0-8AEA580399E4}"];
var myContext = myInventor.TransientObjects.CreateTranslationContext();
var myOptionsNVM = myInventor.TransientObjects.CreateNameValueMap();
try
{
(dwfAddIn as TranslatorAddIn).ShowSaveCopyAsOptions(myDoc, myContext, myOptionsNVM);
for (int i = 1; i < myOptionsNVM.Count + 1; i++)
Console.WriteLine(myOptionsNVM.Name[i] + "   " + myOptionsNVM.Item[i]);
}
catch { Console.WriteLine ("Don´t press cancel next time!"); }

 

 ( To bad about the individual properties, but I have an answer 😉 )

 

 

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

Post to forums  

Autodesk Design & Make Report