Skip to main content
5-Regular Member
November 14, 2018
Question

How to change the Unit system of a model by Weblink?

  • November 14, 2018
  • 1 reply
  • 1326 views
Hello: There is a difficult when I change the UnitSystem of a model by weblink: there is my code: var unit=TempModel.GetPrincipalUnits(); //get the Unitsystem of template model var model=oSession.CurrentModel; var Options=pfcCreate("pfcUnitConversionOptions").Create(pfcCreate("pfcUnitDimensionConversion").UNITCONVERT_SAME_SIZE); model.SetPrincipalUnits(unit,Options); when I run this code,promp an error:XToolkitBadInputs Could anyone help me?Thanks very much!

1 reply

bsyy5-Regular MemberAuthor
5-Regular Member
November 16, 2018
After testing once by once by once,I have solved this problem myself.
Thank you all the same