Bentley Communities
Bentley Communities
  • Site
  • User
  • Site
  • Search
  • User
  • Welcome
  • Products
  • Support
  • About
  • More
  • Cancel
MicroStation
  • Product Communities
  • More
MicroStation
MicroStation Wiki vba recording
    • Sign in

    • +MicroStation Wiki
    • +Administration Wiki
    • +Annotations Wiki
    • +Bentley View Wiki
    • +MicroStation PowerDraft
    • -Programming Wiki
      • A class to help create and modify text element
      • A Complete Example
      • A MicroStation VBA Example With Bentley ProjectWise
      • AddIn Development Using VB.NET
      • C# .NET Template with IPrimitiveCommandEvents Class
      • Capturing Graphics in Dynamic Views
      • Compiling MDL Applications
      • Database Manipulation
      • Debugging Native Code MDL Applications
      • Developing Code in VBA
      • Developing MicroStation Applications For DWG Files
      • Drag and Drop in MicroStation
      • Error: "Cannot save changes to VBA project 'Support' because it is read-only"
      • Getting And Setting Elements Using Graphic Groups In VBA [CS]
      • Getting Started with Visual Basic
      • How To Write A Recursive Routine In MicroStation VBA [CS]
      • Introducing Segment3D Methods In MicroStation V8 2004 Edition
      • Known issues in MDL and MicroStationAPI
      • Launching VBA Applications As Initapps Or Dgnapps [CS]
      • Learning MicroStation Addins Step by Step
      • MDL - Getting Started With XAttributes In MicroStation V8 XM Edition
      • MDL - Native Code Application Development
      • MDL Or MicroStation BASIC Choosing The Right Tool [TN]
      • MFC Dialog And Native Window Support
      • Microsoft Office VBA Patch Utility
      • MicroStation BASIC FAQ
      • MicroStation BASIC Limits [FAQ]
      • MicroStation Developer Documentation and Example Code
      • MicroStation Programming Advice
      • MicroStation SDK
      • MicroStation V8 Programming Tools Readme
      • MicroStation V8 VBA Programming Resources [CS]
      • MicroStation V8 XM Edition View Code Updates
      • MicroStation VBA Resources Revisited [CS]
      • Migrating Dimension Code To MicroStation V8
      • Migrating MDL Applications To Native Code
      • Mouse Wheel Events And The Visual Basic 6.0 IDE
      • Porting MDL Applications To MicroStation V8
      • Reading Elements From A Microsoft Access Database With VBA [CS]
      • Running MDL Applications
      • Scanning For MicroStation V8 Elements In VBA [CS]
      • Unleash A Workspace Wizard Automating Workspace Creation With MicroStation V8 And VBA [CS]
      • Using VBA To Detect The Current Or Last Used Command
      • Using VBA To Programmatically Export A VBA Project [CS]
      • Using VBA To Programmatically Import A VBA Projects Components And References [CS]
      • VBA -- Creating A Complex Application
      • VBA Interface Error: failed creating the comp manager - 0x80040583
      • VBA interface error: unable to get IDE
      • vba recording
      • Working With Levels In MicroStation VBA [CS]
      • Writing An MDL Application To Output Custom Placemarks To Google Earth
      • [V8i C++] PointCloud IPointCloudChannelDisplayHandler
    • +Visualization Wiki

     
     Questions about this article, topic, or product? Click here. 

    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

     

     

    • 2004 Edition
    • VBA
    • help
    • Share
    • History
    • More
    • Cancel
    • Dan Koval Created by Bentley Colleague Dan Koval
    • When: Thu, Sep 5 2013 3:48 PM
    • Revisions: 1
    • Comments: 0
    Recommended
    Related
    Communities
    • Home
    • Getting Started
    • Community Central
    • Products
    • Support
    • Secure File Upload
    • Feedback
    Support and Services
    • Home
    • Product Support
    • Downloads
    • Subscription Services Portal
    Training and Learning
    • Home
    • About Bentley Institute
    • My Learning History
    • Reference Books
    Social Media
    •    LinkedIn
    •    Facebook
    •    Twitter
    •    YouTube
    •    RSS Feed
    •    Email

    © 2021 Bentley Systems, Incorporated  |  Contact Us  |  Privacy |  Terms of Use  |  Cookies