Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

No Go on This LISP in BricsCAD (v19.1) - works in AutoCAD

New user and experienced CAD user and novice CAD programmer here experiences great success with the BricsCAD transition on all but the following:

Could someone inspect the attached, smaller-sized .LSP file by another and the pasted .DCL code (it could not be attached here) and relate why it does not work in BricsCAD v19.1?
It works in AutoCAD 2019.

So far...

SETUP
1. Support file search path is defined
2. Both the .LSP and .DCL are in this path
3. The routine is loaded and available via the "on_start.lsp" file using an AUTOLOAD statement (file is renamed from "acaddoc.lsp" as used with AutoCAD)

THE SYMPTOMS
1. FINDFILE returns 'nil'
2. Error message states a missing file dependency

3DMASS .DCL CODE FOLLOWS:

// 3D_Mass.dcl 3D MASS CALCULATOR (C)2002, Matthew J. Dotson

mass : dialog {

        label = "3D Solid Weight Calculator";
        : row {
        label = "Options For Calculation";
        alignment = centered;


    : edit_box {
        label = "Density";
        key   = "dens";
        edit_width = 5;
        width = 1;
        is_default = true;
    }

    : popup_list {
        key = "mats";
        value = 0;
    }}

    : row {
        alignment = centered;


    : button {
        label = "Pick 3D Solid Object(s)";
        key = "picker";
        width = 5;
        fixed_width = true;
    }}

    : row {
        alignment = centered;


    : text {
        label = "© 2002 Matthew J. Dotson";
        }}

    END OF DCL CODE

I appreciate your attention.

Thanks,
Clinton Hill

lsp
lsp
3D_Mass.lsp
4K

Comments

  • I must learn the correct way to paste in .DCL code as the first part is not formatted in the code box here.

  • edited May 14

    The main issue seems to be the path: "c:/acadmass.mpr". Windows typically blocks access to the root of the C disk. Changing the path (3 times) to a path where you have read and write permissions fixes the problem here.

    Note: there is a '}' missing at the end of the DCL code.

  • I appreciate your suggestions and will make this happen!!! Thanks again, Roy!

  • I am "close but no cigar" in making this routine work after my mucking around with the DCL code made matters worse.

    The original file did not work, I just made matters worse I suppose.

    Add to that I currently lack the necessary troubleshooting / debugging skills at this point.

    QUESTION
    Can someone educate me in finding the correct syntax or other error?

    I have supplied:
    The command line error
    The dialog box error message (PDF attachment)
    The LSP
    The DCL (inline and with suspect code)

    FIRST,....

    HERE IS THE ERROR SHOWN IN COMMAND LINE

    START

    3DMASS

    Loading ...
    * Lisp (new_dialog) failed : DCL id = -1, dialog name 'mass'

    END

    HERE IS THE CURRENT DCL CODE (this is a version that I attempted to modify)


    START DCL FILE

    // 3D_Mass.dcl 3D MASS CALCULATOR (C)2002, Matthew J. Dotson

    mass : dialog {

            label = "3D Solid Weight Calculator";
            : row {
            label = "Options For Calculation";
            alignment = centered;
    
    
        : edit_box {
            label = "Density";
            key   = "dens";
            edit_width = 5;
            width = 1;
            is_default = true;
        }
    
        : popup_list {
            key = "mats";
            value = 0;
        }}
    
        : row {
            alignment = centered;
    
    
        : button {
            label = "Pick 3D Solid Object(s)";
            key = "picker";
            width = 5;
            fixed_width = true;
        }}
    
        : row {
            alignment = centered;
    
    
        : text {
            label = "© 2002 Matthew J. Dotson";
            }}
            }
    
    
    
    
    
    
            ok_cancel;
    
            }
    

    END DCL FILE

    I appreciate your assistance!

    Clint

    lsp
    lsp
    3D_Mass.lsp
    4K
    pdf
    pdf
    3D_MASS Routine DCL Error of 05 21 2019.pdf
    6K
  • I can never get ALL of the DCL code in the code box: What am doing wrong when I paste it in here?

  • I guess the .dcl file is just not found, because it is not located in your support path. If so, you could specify an absolute path to the file in the lisp code. Alternatively, add the folder containing the .dcl file to your support path (SETTINGS -> SRCHPATH).

  • I thank you, Owen. Try, try again...

  • I've re-formatted your dcl and fixed the braces.
    Try this

    // 3D_Mass.dcl 3D MASS CALCULATOR (C)2002, Matthew J. Dotson
    mass : dialog
    {
        label = "3D Solid Weight Calculator";
        : row
        {
            label = "Options For Calculation";
            alignment = centered;
        : edit_box
        {
                label = "Density";
            key   = "dens";
            edit_width = 5;
            width = 1;
            is_default = true;
        }
        : popup_list
        {
            key = "mats";
            value = 0;
        }
        }
      : row
      {
        alignment = centered;
        : button
        {
            label = "Pick 3D Solid Object(s)";
            key = "picker";
            width = 5;
            fixed_width = true;
        }
      }
      : row
      {
        alignment = centered;
        : text
        {
            label = "© 2002 Matthew J. Dotson";
        }
      }
      ok_cancel;
    }
    
    txt
    txt
    3D_Mass.dcl.txt
    706B
  • Wow! Thank you, Kerry! Now, I know how to attach a .dcl file, too!
  • I am nearly "there" getting this LISP working. Hopefully, this is the last of what has been an adventure of sorts:

    I receive the following error when applying the latest submissions that are no doubt produced by yours truly:

    COMMAND LINE
    --- START

    3DMASS

    Loading ...
    * Lisp (new_dialog) failed : DCL id = 1, dialog name 'mass'
    ; error : quit / exit abort
    3DMASS
    • Lisp (new_dialog) failed : DCL id = 2, dialog name 'mass'
      ; error : quit / exit abort

    ---END

    I appreciate any suggestions!

    I must learn debugging very soon and within BLADE!

  • Here is a zip with the DCL fixed by @Kerry Brown and the LSP revised by me. The code now uses the vl-list-loaded-lisp function to determine the path of the LSP and uses that to find the DCL. So you don't have to worry about the search path.

    zip
    zip
    3D_Mass.zip
    2K
  • How fortunate can a BricsCAD fan and newbie user be? Thanks Roy... and Kerry!!!

  • @chillme1 said:
    I must learn the correct way to paste in .DCL code as the first part is not formatted in the code box here.

    I've struggled with this as well, when trying to paste VBA code. Certain things in some code signal the web host to change formatting. I've abandoned trying to use the code box because of this.

    -Joe

Sign In or Register to comment.
Origami
Origami is the Japanese word for paper folding. ORI means to fold and KAMI means paper and involves the creation of paper forms usually entirely by folding.

Powered by VanillaForums, Designed by Steam