AnsweredAssumed Answered

DxDesinger 7.9.2: Can't "get object" after DxDesigner was set to be invisible

Question asked by markus.reich on Aug 1, 2011
Latest reply on Dec 18, 2014 by kendall_hiles

Hi,

I have following script:

Set dxdapp = GetObject(,"Viewdraw.Application")

set dxdview = dxdapp.ActiveView   ' View Object

dxdapp.Visible = False

If Not dxdView Is Nothing Then

  Set dxdblock = dxdview.ActiveBlock

  sTopBlock = dxdblock.GetName(SHORT_NAME)' Get the name of the top level schematic

  WalkDesign (sTopBlock)

  SchematicSheetDocuments.Close

  Scripting.sleep 100

  dxdapp.SchematicSheetDocuments.Open sTopBlock, "1"

Else

  msgbox "Kein Schaltplan geöffnet"

End IF

dxdapp.Visible = True

 

If I call this script the second time, I always get the error message:

 

Source:'Laufzeitfehler in Microsoft VBScript'

Line:58  Char:0

Error:0x800a01ad  'ActiveX-Komponenten kann kein Objekt erstellen: 'GetObject''

 

What is wrong?

 

Kind regards,

Markus

Outcomes