ScriptSpot

Forum topic · General Scripting

Changing unit type with variable

By phantomx · 2012-02-15

Description

Hi,
I'm trying to change the system units with a variable. I retrieve data from an external XML file.

max want to get something like this:


units.SystemType = #Centimeters

but because I retrieve my data from an XML it gives me a string like this:


units.SystemType = "#Centimeters"

is there a way to convert this string into something I can use to change this value?

thanks!

Comments (1)

phantomx · 2012-02-15

nevermind.. just found out.


variable as name 
units.SystemType = variable

this did it!