Cannot find definition for dialog ...

Cannot find definition for dialog ...

hencoop
Advisor Advisor
786 Views
1 Reply
Message 1 of 2

Cannot find definition for dialog ...

hencoop
Advisor
Advisor

Hello all,

I have an open source autolisp application for which I've made several older versions loadable.  All but one of these older versions load and function well; however, one loads well but "Cannot find definition for dialog ..." when the main application is run.

 

I have verified the name of the DCL being called, that it exists and can be found using (FINDFILE "gpdgn-20200515.dcl") and that the dialog definitions in the dcl file are not generating any errors.

 

All of the versions are segregated by filename where YYYYMMDD is the version number (date):

"GPDGN-YYYYMMDD.LSP"

"GPDGN-ANNEX-1-YYYYMMDD.LSP"

"GPDGN-ANNEX-2-YYYYMMDD.LSP"

"GPDGN-YYYYMMDD.DCL"

My code for loading them sets:

'gpd-version to the user selected YYYYMMDD; and,

 'dialogname to (STRCAT "gpdgn-" gpd-version)

All versions execute (SETQ gpdgn_dlg# (LOAD_DIALOG dialogname)) and then execute code similar to this:

         (NEW_DIALOG
           "alnname" ; just one of the definitions in the DCL
           gpdgn_dlg#
           (IF defact_by_a_name
             defact_by_a_name
             ""
           ) ;_ end of IF
           (IF alnname_loc
             alnname_loc
             '(-1 -1)
           ) ;_ end of IF
         ) ;_ end of NEW_DIALOG

All of these version files were taken from regular server backups and are contemporary with the other files in the version (meaning that they were working well together at the time they were backed up).

 

What am I missing that is causing this particular version to report:

"Cannot find definition for dialog gpdgn-20200515"?

 

 

AutoCAD User since 1989. Civil Engineering Professional since 1983
Product Version: 13.6.1963.0 Civil 3D 2024.4.1 Update Built on: U.202.0.0 AutoCAD 2024.1.6
                        27.0.37.14 Autodesk AutoCAD Map 3D 2024.0.1
                        8.6.52.0 AutoCAD Architecture 2024
0 Likes
Accepted solutions (1)
787 Views
1 Reply
Reply (1)
Message 2 of 2

hencoop
Advisor
Advisor
Accepted solution

Hello again all,

It turns out it was a mistake I made in the first (NEW_DIALOG ...) code section calling the main dialog in this version.  At some point I had changed this to "gpdgn-20200515" when it should have remained "gpdgn".   The internal definition name "gpdgn" remains unchanged in all of these versions.  That's what makes it easy.  I only need to change the initial (LOAD_DIALOG "gpdgn") to (LOAD_DIALOG dialogname) and everything else works!

 

Sorry for missing this simple coding error.  Trust your instruments!  A definition for the dialog named "GPDGN-20200515" could NOT be found!  The answer was in the error message all along!

AutoCAD User since 1989. Civil Engineering Professional since 1983
Product Version: 13.6.1963.0 Civil 3D 2024.4.1 Update Built on: U.202.0.0 AutoCAD 2024.1.6
                        27.0.37.14 Autodesk AutoCAD Map 3D 2024.0.1
                        8.6.52.0 AutoCAD Architecture 2024