3 Replies Latest reply on Feb 17, 2011 7:48 AM by taco.de.vries

    DxDesigner top sheet will not re-open..

    taco.de.vries

      I have a little vbs script that 'walks' the design and performs some tasks,

      actually most of the code came from the examples in this forum (thanks for that)

       

      Now I do have 1 small problem, when the script is finished, the topblock will not re-open.

      Even stranger, when I put the Open command in a seperate vbs script (with hardcoded and double quoted names)

      the sheet WILL open.

       

      Does anybody have a solution/workaround for this?

       

      Thanks,

       

      Taco

       

      Dim project, prjpath, sTopBlock, sPath, sSchematic, BLok, BlocList, sShee

      Set project   = Application.GetProjectData

          prjpath   = project.GetProjectPath

          sTopBlock = Application.GetProjectData.GetiCDBDesignRootBlock(Application.GetActiveDesign())

      Set BlockList = CreateObject("Scripting.Dictionary")

       

      ' create list

      For Each objComp In Application.DesignComponents("", sTopBlock, "-1", "STD", True)

      sPath          = objComp.GetName(0)

      sSchematicPath = objComp.GetName(FULL_PATH_NAME)

      sSchematic     = objComp.SymbolBlock.GetName(SHORT_NAME)

      BlockList.Add sPath, sSchematic

      Next

       

      ' walk list

      For Each Block In BlockList.Keys

          AppendOutput "Output", "Block " & Block & " Schematic " & sSchematic

      sSchematic = BlockList(Block)

      If Not Application.SchematicSheetDocuments.GetAvailableSheets(sSchematic) is Nothing Then

        For Each sSheet In Application.SchematicSheetDocuments.GetAvailableSheets(sSchematic)

         If Application.PushPath(sTopBlock, Block, sSheet) Then

          Application.PushPath sTopBlock, Block, sSheet

          AppendOutput "Output","push down " & sTopBlock & " " & Block & " " & sSheet

         End If

         SchematicSheetDocuments.Close

        Next

      End If

      Next

       

      ' Re-open top block

      Application.SchematicSheetDocuments.Open sTopBlock , "1"