vba recording


Re: vba recording by rphillipsiii

This was the View Settings, where you turn on and off line weights, Datafields, ETC


vba recording by rphillipsiii

When using the record to attempt to turn on datafields, then select [ALL], and then close [X] the following is what I got and it dose open the Attributes selection box and check the DataFields on, but that is where it quits.

10:06 AM 7/13/2010
4:06 PM 7/12/2010 - New Macro Recorded in VBA
 did not select the apply nor close the open viewsettings window


Sub DataFields()
    Dim startPoint As Point3d
    Dim point As Point3d, point2 As Point3d
    Dim lngTemp As Long

'   Start a command
    CadInputQueue.SendCommand "DIALOG VIEWSETTINGS TOGGLE"

'   Set a variable associated with a dialog box
    SetCExpressionValue "msDialogState.viewSettingsP->view", 0, "MGDSHOOK"

    SetCExpressionValue "msDialogState.viewSettingsP->flags.ed_fields", 0, "MGDSHOOK"

    SetCExpressionValue "msDialogState.viewSettingsP->flags.ed_fields", 1, "MGDSHOOK"

    CommandState.StartDefaultCommand
End Sub

I tried it again today, but still not getting the command picked up when I press the "ALL"
Key and it stays open? I pressed the [X] key and it closed, but when you run the MACRO it dose not.


Sub Macro1()
    Dim startPoint As Point3d
    Dim point As Point3d, point2 As Point3d
    Dim lngTemp As Long
' Second attempt, 07/13/10 - Still will not do the all and close? I did press the buttons, but it did not
' pick them up?
'   Start a command
    CadInputQueue.SendCommand "DIALOG VIEWSETTINGS TOGGLE"

'   Set a variable associated with a dialog box
    SetCExpressionValue "msDialogState.viewSettingsP->view", 0, "MGDSHOOK"

    SetCExpressionValue "msDialogState.viewSettingsP->flags.ed_fields", 0, "MGDSHOOK"

    CommandState.StartDefaultCommand
End Sub