Files
wg_cpso/CPSO/Commands/0050_Model/CSetModelUnitSystem.cs
2026-03-25 18:20:24 +08:00

43 lines
1.3 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using CPSO;
using CaeModel;
using CaeMesh;
using CaeGlobals;
namespace CPSO.Commands
{
// Compatibility v1.1.1 - the command was renamed to CSetNewModelProperties
[Serializable]
class CSetModelUnitSystem : PreprocessCommand
{
// Variables
private UnitSystemType _unitSystemType;
// Constructor
public CSetModelUnitSystem(UnitSystemType unitSystemType)
: base("Set unit system")
{
_unitSystemType = unitSystemType;
}
// Methods
public override bool Execute(Controller receiver)
{
receiver.SetNewModelProperties(ModelSpaceEnum.ThreeD, _unitSystemType);
return true;
}
public override string GetCommandString()
{
return base.GetCommandString() + _unitSystemType.GetDescription();
}
}
}