How to get the Unit String of the active Project Unit system using ACT?
Options
![Ayush Kumar](https://us.v-cdn.net/6037473/uploads/userpics/RGJ3E8O4WFAG/n98CYBYJ7H6ZS.jpg)
Ayush Kumar
Member, Moderator, Employee Posts: 419
![Ansys Employee](https://us.v-cdn.net/6037473/uploads/badges/RVRDV39KPJ91.png)
![Solution Developer Community of Practice Member](https://us.v-cdn.net/6037473/uploads/badges/274G8C56SBE6.png)
Answers
-
This can be requested using JavaScript:
cmd = """unit_str = DS.UnitSystem.UnitString (DS.Script.id_utLENGTH); returnFromScript(unit_str)""" unit_str = ExtAPI.Application.ScriptByName("jscript").ExecuteCommand(cmd)
For other units one can replace
id_utLENGTH
accordingly. Eg:id_utANGLE
id_utVOLUME
...
0 -
Direct method:
ExtAPI.DataModel.CurrentUnitFromQuantityName("Length") # Enter quantity name
8