2 Replies Latest reply on Apr 10, 2014 8:14 AM by jnemeth

    DxDesigner - Check for open sheets.

    jnemeth

      Hello,

       

      I would like to use automation to determine if there are other User's in my DxDesigner project before I execute various functions. Are there methods available to do this at the design level? It appears that I have to push in to each sheet of my design and execute IsReadOnly( ) to get a status of True of False.

       

      Is there a better way? (i.e Query iCDB or lock files or???)

       

      Thanks.

        • 1. Re: DxDesigner - Check for open sheets.
          Patrick.Cashman

          I would start with something like this:

           

          Dim n As Integer

          Dim schms As ViewDraw.IStringList

          Dim sheets As ViewDraw.IStringList

          Dim sheet As ViewDraw.SchematicSheetDocument

           

           

          schms = app.SchematicSheetDocuments.GetAvailableSchematics

          For n = 1 To schms.GetCount

          sheets = app.SchematicSheetDocuments.GetAvailableSheets(schms.GetItem(n))

           

          For Each sheet In sheets

           

          If sheet.IsReadOnly Then

          'do something

          End If

           

          Next

          Next

          • 2. Re: DxDesigner - Check for open sheets.
            jnemeth

            Hi Patrick,

             

            Thanks for taking the time to reply. That's pretty much what I ended up doing. I really wanted to quickly find out up front if anyone was in the design, but instead if I open a schematic and it's read only, I just write a note to the log file that this sheet could not be updated.

             

            Thanks again.