Ilogic rule for exporting DWFx that includes iProperties

Ilogic rule for exporting DWFx that includes iProperties

MikeOG
Contributor Contributor
256 Views
1 Reply
Message 1 of 2

Ilogic rule for exporting DWFx that includes iProperties

MikeOG
Contributor
Contributor

Hi guys, we are looking for some ilogic code that exports a DWFx file that includes the meta data / iProperties. Does anyone know if its possible? We know its possible with DWG files - when viewing a DWG file in Vault it has all the fields filled out (Description, subject, designer etc.). Anyone help would be greatly appreciated!

DWG in Vault - This is how we want the DWFx files to look like:

MikeOG_0-1732482774075.png


DWFx file in Vault - No Meta Data:
MikeOG_1-1732482801646.png


This is what I have so far to export the DWFx from jLane in this post:

 

i = MessageBox.Show ("Launch the viewer now?", "Title",MessageBoxButtons.YesNo)
If i = vbYes Then : launchviewer = 1 : Else : launchviewer = 0 : End If
 
 
path_and_name = ThisDoc.PathAndFileName (False) ' without extension
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") = launchviewer
oOptions.Value("Publish_All_Component_Props") = 1
oOptions.Value ("Publish_All_Phvsical Props") = 1
oOptions.Value("Publish_All_User_Defined_Properties_Props") = 1
oOptions.Value("Publish_All_Summary_Information_Props") = 1
oOptions.Value("Publish_All_Document_Summary_Information_Props") = 1
oOptions.Value("Publish_All_Design_Tracking_Properties_Props") = 1
oOptions.Value("Password") = 0
oOptions.Value("Publish_Mode") = DWFPublishModeEnum.kCompleteDWFPublish
End If
 
'Set the destination file name
oDataMedium.FileName = path_and_name & ".dwfx"
 
'Publish document.
Call DWFAddIn.SaveCopyAs (oDocument, oContext, oOptions, oDataMedium)
If launchviewer = 1 Then ThisDoc.Launch(path_and_name & ".dwfx")

 

257 Views
1 Reply
Reply (1)
Message 2 of 2

WCrihfield
Mentor
Mentor

Hi @MikeOG.  I honestly have never used that exported file type, so I am not super familiar with it, but I may be able to help some with the export code.  There is a way to determine what the 'Options' are when using the Inventor API TranslatorAddIn.SaveCopyAs method, but its not super detailed.  Plus, the options may change, depending on the type of Document you are trying to export from.  As far as I can tell at the moment, using this technique from Inventor 2024.3.1, we do not have granular control over which specific iProperties will get included when exporting an IDW type file out to the DWFx file format.  It definitely seems possible manually, on the Properties tab of the Options dialog.  It does seem like we can toggle that one control between "Only Properties with values" to the alternative.  But I do not see anything in the 'report' about which specific/individual properties should be included when it is set to the alternative option.  Maybe this was updated in 2025, not sure.

 

Anyways, as far as I can tell, below are all the option names, their value types, and their current values (on my system at the moment)...values can change though.  Also, zero and one are often used instead of Boolean (0 = False / 1 = True).  Attached is a text file containing the list of options I found with my 'snooping' tool, because its a pretty long list.  I also attached a text file containing the custom iLogic rule I used for snooping into those options, if you are interested. 

 

Edit:  I should also mention that sometimes the 'Value' just looks like an Integer, with an odd looking value (not just 0 or 1), and not a 'measurement' value.  Those sometimes represent the numerical value of an 'Enum' variation.  There are a couple of those in this report.

One is referring to the DWFPublishModeEnum.  And I think one of the others is referring to the AccuracyEnum.  If you look at those two online help pages, you will find matching numerical values to what you see in the report, and can cross-reference that numerical value with a 'name' of that Enum variation, to see what it means. 

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes