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, 

Parents
  • 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

  • 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? 

Reply Children
  • 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