ICimSetup

The ICimSetup Interface allows you get/modify the Setup parameters.

Methods

double get_DieLayoutParamValue(SetupDieDefaultParams iParam)

string get_GeneralParamFormula(string iGroupName, string iParamName)

SetupValueType get_GeneralParamType(string iGroupName, string iParamName)

double get_GeneralParamValue(string iGroupName, string iParamName)

int get_GeneralParamValueList(string iGroupName, string iParamName, out object oValueList)

double get_MoldLayoutParamValue(SetupMoldDefaultParams iParam)

ISetupValueData GetEmptySetupValueData()

SetGeneralParamsValue(object iSetupValueDataList)

Remarks

This interface is created using IMdlrModel:GetCimSetup() or AssemblyModel:GetCimSetup()

This interface is used to update existing parameters only.

Sample C# code:

            // Init Cimatron application

            interop.CimAppAccess.AppAccess app = new interop.CimAppAccess.AppAccess();

            interop.CimatronE.Application CimApp = (interop.CimatronE.Application)app.GetApplication();

            // Get PDM interface

            interop.CimatronE.IPdm pdm = CimApp.GetPdm();

            // Get active document from application

            interop.CimMdlrAPI.ICimDocument doc = (interop.CimMdlrAPI.ICimDocument)CimApp.GetActiveDoc();

            

            // Get Model from document

            interop.CimatronE.IModel Model = pdm.GetModel(doc.GetPath());

            

            // Get Model container from active document

            interop.CimMdlrAPI.IMdlrModel CurrModel = (interop.CimMdlrAPI.IMdlrModel)Model;

            

            // Get the Setup interface from currecnt model

            interop.CimServicesAPI.ICimSetup set = (interop.CimServicesAPI.ICimSetup)CurrModel.GetCimSetup();

            // Get parameter values

            double RetVal1 = set.get_GeneralParamValue("MyGroup", "Val1");

            // Get Mold layout parameter values

            double RetVal3 = set.get_MoldLayoutParamValue(interop.CimServicesAPI.SetupMoldDefaultParams.cmMoldMaxX);

            // Get Die layout parameter values

            double RetVal4 = set.get_DieLayoutParamValue(interop.CimServicesAPI.SetupDieDefaultParams.cmDieMatrixesOffset);

            // Get parameter value list

            object RetValList;

            int ValL = set.get_GeneralParamValueList("MyGroup", "ValL",out RetValList);

            // Create Empty setup value object

            interop.CimServicesAPI.ISetupValueData valsData = set.GetEmptySetupValueData();

            // Update value of existing group/parameter name.

            valsData.GroupName = "MyGroup";

            valsData.ParamName = "Val2";

            valsData.Value = 333.333;

            // Create array of setup value object

            interop.CimServicesAPI.ISetupValueData[] SetupNewValues = new interop.CimServicesAPI.ISetupValueData[2];

            SetupNewValues[0] = valsData;

            

            // Set the new values

            set.SetGeneralParamsValue(SetupNewValues);

Some functionality may be dependent on the product package. Contact your Reseller if you require a license.