Hi,
I have an input monitor function and I am trying to set "Top of Slab" parameter of "Place Slab Form" command.
I recorded below macro to be able to find the parameter name.
Sub Macro1() Dim startPoint As Point3d Dim point As Point3d, point2 As Point3d Dim lngTemp As Long' Start a command CadInputQueue.SendCommand "TFPLACE FORM 1LINE"' Set a variable associated with a dialog box SetCExpressionValue "bwGlobals->wallTopMode", 1, "FORMS" SetCExpressionValue "bwGlobals->offset.absolute.z", (ActiveModelReference.UORsPerMasterUnit * 123), "BLDDESIGNER" CadInputQueue.SendCommand "DMSG ACTIVATETOOLBYPATH Place Forms\Slab" SetCExpressionValue "bwGlobals->offset.absolute.z", (ActiveModelReference.UORsPerMasterUnit * 456), "BLDDESIGNER" CommandState.StartDefaultCommand End Sub
And I tried to set it using the below code. But it doesn't work.
MdlDesc *taskID; CExprValue value; int status; taskID = mdlSystem_findMdlDesc("BLDDESIGNER"); value.type = CEXPR_TYPE_DOUBLE; mdlCnv_masterToUOR(&value.val.valDouble, 2650.0, ACTIVEMODEL); status = mdlCExpression_setValueForApp(&value, NULL, "bwGlobals->offset.absolute.z", VISIBILITY_CALCULATOR, taskID);
As you will see from the macro recording, BaseOffset of Place Linear Form command and Top of Slab of Place Slab Form uses the same variable.
When you click both commands interesting actions are taken. Place Slab Form command is triggerred with some other commands;
// Below parameters are taken from input monitor function // PLACE LINEAR FORM clicked CMDNUM: 0x01010100 unparsed:"" taskId:(FORMS) // PLACE SLAB FORM clicked CMDNUM: 0x81230000 unparsed:"Place Forms\Slab" taskId:(USTN) CMDNUM: 0x01010400 unparsed:"" taskId:(FORMS) CMDNUM: 0x81260000 unparsed:"" taskId:() CMDNUM: 0x81290000 unparsed:"Place Forms\Slab" taskId:()