DxDesigner top sheet will not re-open..

Discussion created by taco.de.vries on Feb 15, 2011
Latest reply on Feb 17, 2011 by 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?






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



' 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



End If



' Re-open top block

Application.SchematicSheetDocuments.Open sTopBlock , "1"