hi I have this code I have quickly added 2 more parameter in.
SyntaxEditor Code Snippet
'Define the open document
Dim oDoc As Document
oDoc = ThisDoc.Document
'Look at all of the files referenced in the open document
Dim docFile As Document
ModelName = IO.Path.GetFileName(ThisDoc.ModelDocument.FullFileName)
'MessageBox.Show(ModelName)
If Not ThisApplication.ActiveDocument.DocumentType = kAssemblyDocumentObject Then
Return
End If
For Each docFile In oDoc.AllReferencedDocuments
'open the indexed file
'true opens the file normaly
'false opens the file programatically without generating the graphics
ThisApplication.Documents.Open(docFile.FullFileName, True)
oMyParameter=ThisApplication.ActiveDocument.ComponentDefinition.Parameters.UserParameters
'creates a new "Numeric" parameter
myNewparam1 = "Parameter_Name1" ' replace Parameter_Name with your new name
myNewparamValue1 = "111" 'replace Parameter_value with your new value'convert for parameter in centremeters
myNewparamValue2 = myNewparamValue1 / 10
oParameter = oMyParameter.AddByValue(myNewparam1, myNewparamValue2, UnitsTypeEnum. kDefaultDisplayLengthUnits)
myNewparam2 = "Parameter_Name2" ' replace Parameter_Name with your new name
myNewparamValue2 = "222" 'replace Parameter_value with your new value'convert for parameter in centremeters
myNewparamValue3 = myNewparamValue2 / 10
oParameter = oMyParameter.AddByValue(myNewparam2, myNewparamValue3, UnitsTypeEnum. kDefaultDisplayLengthUnits)
myNewparam3 = "Parameter_Name3" ' replace Parameter_Name with your new name
myNewparamValue3 = "333" 'replace Parameter_value with your new value'convert for parameter in centremeters
myNewparamValue4 = myNewparamValue3 / 10
oParameter = oMyParameter.AddByValue(myNewparam3, myNewparamValue4, UnitsTypeEnum. kDefaultDisplayLengthUnits)
docFile.Save
docFile.Close
Next
iLogicVb.UpdateWhenDone = True
I also have this code that should tick the export box.
SyntaxEditor Code Snippet
Parameter.Param(docFName,"Parameter_Name1").ExposedAsProperty = True