how to export the user parameter as xml.

how to export the user parameter as xml.

khadeerkruthi
Contributor Contributor
622 Views
2 Replies
Message 1 of 3

how to export the user parameter as xml.

khadeerkruthi
Contributor
Contributor

i have tried the export and import XML but I need only the selected user parameter to be exported.

0 Likes
Accepted solutions (1)
623 Views
2 Replies
Replies (2)
Message 2 of 3

Michael.Navara
Advisor
Advisor
Accepted solution

There is option to export "Key parameters only" in Options... dialog.

MichaelNavara_0-1680259371441.png

But export to XML has no API.

 

Or you can export all parameters and then edit this file to remove unwnated parameters from the file. For this you can use several tools from System.Xml namespace in .NET Framework

 

0 Likes
Message 3 of 3

WCrihfield
Mentor
Mentor

Hi guys.  Just wanted to add this too, so you (and others) know about it.  It's not exactly API, just iLogic, but since it is going through the iLogicVb.Automation object, this should then be available to use outside of iLogic with vb.net by getting the ApplicationAddIn.Automation object that represents the iLogic add-in.  It will not have any 'intellisense' to recognize that it is available, or how to use it outside of iLogic, but it should still be possible to use.

Dim sXMLfile As String = "C:\Temp\Exported Params.xml"
i = iLogicVb.Automation.ParametersXmlSave(oDoc, sXMLfile, XmlSaveOption.KeysOnly)
i = iLogicVb.Automation.ParametersXmlLoad(oDoc, sXMLfile)

You obviously wouldn't want to run both lines together like that though.  Just showing the lines of code available to us.  Below are the links to their online help pages.

IiLogicAutomation.ParametersXmlSave Method 

IiLogicAutomation.ParametersXmlLoad Method 

 

Wesley Crihfield

EESignature

(Not an Autodesk Employee)