AnsweredAssumed Answered

What is the PATH of the actual project in XPedition Designer?

Question asked by bigzoley on Jun 3, 2019
Latest reply on Jun 4, 2019 by bigzoley
Hi Community,
I am pretty new in this community.
I have created a new menu in Xpedition Designer (Xpedition Enterprise X-ENTP VX.2.3) for sending the created text files for further processing. For this I should be able to figure out the current project's file path. I have tried a couple of different ways trying to extract this information from sample codes I have found here, but without any success. Once I got error message that the "path" property is obsoleted, other times I got empty string for the path.
Please help!
My script is something like this (trying to display the path, but an empty string shows up where I expect this path):
' =========================================================================================================
Option Explicit
' =========================================================================================================
Scripting.DontExit = True
Dim pcbApp
'Set pcbApp = GetMGCObject("MGCPCB.ExpeditionPCBApplication")
'Call Scripting.AddTypeLibrary("MGCPCB.Application")
Set pcbApp = GetObject("","Viewdraw.Application")
Dim strPrjFile : strPrjFile = pcbApp.GetProjectData.GetProjectFilePath
'WScript.Echo "ECHO?"
' Get the active document
Dim pcbDoc
Set pcbDoc = getDocument(pcbApp)
Call main
' =========================================================================================================
' CheckIn Design command
Sub CallSubMenu2(cmdId)
    if pcbApp is nothing then
        MsgBox "Cannot find Application!"
        Exit Sub
    end if    
    MsgBox "Testing... " & strPrjFile
    'Set pcbDoc = getDocument(pcbApp)
    'if pcbDoc is nothing then
    '    MsgBox "Cannot find the Active Document!"
    '    MsgBox "Testing... " & strPrjFile
    'end if
End Sub
Private Sub main()
    ' Calling CallSubMenu2
End Sub
Public Function getDocument(appObj)
    On Error Resume next
    Dim docObj
    Set getDocument = Nothing
    '  Collect the active document
    Set docObj = appObj.ActiveDocument
    If (Err) Then  
        MsgBox "No active document: " + Err.Description,epcbStatusFieldError
        Exit Function
    End If
    '  Everything is OK, return document
    Set getDocument = docObj
End Function
Again my goal is to get the PATH of the actual project.
Additional question, and sorry if it seems a very rookie one. Is there a good reference of these Objects (like MGCPCB.ExpeditionPCBApplication), that I can use during this development?
your answers are greatly appreciated.