AnsweredAssumed Answered

how can I close DxDesigner /viewdraw at the end of script?

Question asked by merlin on Nov 9, 2010
Latest reply on Nov 9, 2010 by Satoru

hello,

 

I'm working at a script who makes:

1. Findout all my variables

2. CloseProject

3. Give all variable to the PDM-System

4. PDM-System zip the project-container and put it in the PDM-filesystem

 

these steps are ok.

 

But how can I close the application viewdraw at the end of the script.

 

here is my script:

 

Option Explicit
  
  
    ' ----------------------------------------------------------------------------------
   
    Sub App_ProjectClosed
   
        Scripting.AddTypeLibrary("ViewDraw.Application")
        Dim vdapp,vddoc, mShell
        Set vdapp = GetObject (,"ViewDraw.Application")
        Set vddoc = vdapp.ActiveDocument
       
        CloseProject()
       
        Dim AktuelleZeit
        AktuelleZeit = Timer
        Do
            'System nicht blockieren
            'DoEvents
        Loop Until Timer - AktuelleZeit > 15
       
        'MsgBox "Project wird im OpenEDM gespeichert!"
             
        vdapp.StatusBarText("Das Project wurde OpenEDM gespeichert!")
        InsPDM
       
       
    End Sub
   
    ' ----------------------------------------------------------------------------------
 
   
    ' ----------------------------------------------------------------------------------   
    Sub CloseApplication
      
        Scripting.AddTypeLibrary("ViewDraw.Application")
        Dim vdapp,vddoc
        Set vdapp = GetObject (,"ViewDraw.Application")       
        vdapp.CloseApplication
    End Sub
    ' ----------------------------------------------------------------------------------
    ' HIER GEHT ES LOS !!!
    ' Project schliessen und an PDM geben
    ' ----------------------------------------------------------------------------------
    Schreibrecht

 

 

you can answer in german or english.

 

best regards

Norbert

Outcomes