Message 1 of 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi all,
I have this little iLogic snippet that writes out the name and value of all parameters in active document.
doc = ThisDoc.Document params = doc.ComponentDefinition.Parameters names = New List(Of String) values = New List(Of String) For Each param In params If Len(param.Name)>4 Then names.Add(param.Name) values.Add(param.Value.ToString) Else End If Next MultiValue.List("ParamsList") = names MultiValue.List("ParamsValues") = values GoExcel.CellValues("COVER.DEFAULT.PARAMS.xlsx", "Sheet1", "A2", "A400") = MultiValue.List("ParamsList") GoExcel.CellValues("COVER.DEFAULT.PARAMS.xlsx", "Sheet1", "B2", "B400") = MultiValue.List("ParamsValues") GoExcel.Save GoExcel.Close
The problem is it ignores the parameter's units and assumes cm for length and rad for angular.
I need another nested IF - Then that says:
IF param.Values.'UnitType' is "in" THEN
param.Value = param.Value/2.54
Else If param.Values.'UnitType' is "deg" THEN
param.Value = param.Value*360/2/3.14159
End If
I just do not know the syntax or proper method.
Any suggestions? My bet is someone already has it canned and ready to go
Thanks
Solved! Go to Solution.