Key-in to disable drag operations?

Hi there,

Is there a key-in command to disable drag operations? 
I like being able to trim / extend by dragging a line but I don't want to accidentally move an element when attempting to draw a selection marque. 

If there is a key-in, I can assign it to an F - key to improve my workflow. 

Thanks, 

  • It is always a good idea to mention which version of MicroStation you're currently using as this can make a difference with any answers provided.

    MicroStation Forum best practices

    I assume you're talking about the option in the Preference that can be toggled on/off to Disable Drag Operations. Unfortunately there is no specific key-in to turn this preference on/off.

    Drag Operations

    If required you could record a macro to perform this operation for use in a function key.

    I recorded the following in MicroStation CONNECT Edition which may be of assistance.

    Implements IModalDialogEvents
    Private Sub IModalDialogEvents_OnDialogClosed(ByVal DialogBoxName As String, ByVal DialogResult As MsdDialogBoxResult)
    
    End Sub
    
    Private Sub IModalDialogEvents_OnDialogOpened(ByVal DialogBoxName As String, DialogResult As MsdDialogBoxResult)
    
        If DialogBoxName = "Preferences [Personal]" Then
    
        '   Set a variable associated with a dialog box
            SetCExpressionValue "savePrefs.flags.disableDrag", 0, "USERPREF"
    
        '   Remove the following line to let the user close the dialog box.
            DialogResult = msdDialogBoxResultOK
    
        End If  ' Preferences [Personal]
    
    End Sub

    Regards
    Andrew Bell
    Technical Support
    Bentley Systems

  • Hi Ario,

    as Andrew mentioned, please follow the best practices and always specify used product and its exact version.

    It is possible to switch off dragging in User Preferences (did you search help for "drag" keyword?). There is no key-in assigned to this setting, but as Andrew shows, it can be changed using VBA macro (that can be called using key-in).

    Regards,

      Jan

  • Sorry everyone. 
    We're using MicroStation V8. 

    I'm having a little trouble recording and assigning the macro to a function button. 
    I successfully recorded a BASIC macro to do what I need but I'm not sure what the key-in to run it is. 

    Is there a page showing all possible key-ins somewhere? 

  • Yes, I toggle this setting on and off several times a day. Drag operations are fairly dangerous when working with text elements that can accidentally be dragged from their empty space characters. 

    Since I do this so often and it takes quite a few clicks, I'm looking to assign it to one of the function keys. 

    We're using MicroStation v8.

  • I successfully recorded a BASIC macro

    Prefer to use VBA.  BASIC is not supported in MicroStation CONNECT, so when you upgrade you'll have to start again.

     supplied some VBA source that he recorded.  You can use that in a one-liner...

    SetCExpression "savePrefs.flags.disableDrag", 0

    and...

    SetCExpression "savePrefs.flags.disableDrag", 1

    Run that from the MicroStation V8i key-in window like this...

    vba execute SetCExpression "savePrefs.flags.disableDrag", 0
    vba execute SetCExpression "savePrefs.flags.disableDrag", 1

    If those work, you can assign them to your function keys. 

    Note: The key-in for MicroStation CONNECT should be something like this...

    macro vba execute SetCExpression "savePrefs.flags.disableDrag", 1

    However, MicroStation doesn't accept that.  See Jan's working version below.

     
    Regards, Jon Summers
    LA Solutions