Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Help with LISP routine

9 REPLIES 9
SOLVED
Reply
Message 1 of 10
tjm024000
1201 Views, 9 Replies

Help with LISP routine

I just switched to AutoCAD 2012. The attached LISP routine worked in 2008, but doesn't work in 2012. Can someone help me out?

Tags (3)
9 REPLIES 9
Message 2 of 10
gjrcmb
in reply to: tjm024000

After looking at the files I can tell you that the lsp file is missing some code and has some syntax errors, and will not operate with any version of AutoCAD as is.  The dcl file also has some syntax errors that prevent it from operating properly.  I did not fully analyze the programs and there may be other problems.  Additionally the dcl file must reside in a folder that is listed in the AutoCAD search path for it to be found by the lsp program, but that is incidental to the other problems.

I question whether some one messed with the files or just flat out didn't know what they were doing when trying to modify them.  I do not want to modify the files for you as they appear to be proprietary.  Maybe it's time to pick up an Autolisp book.

If you company backups these files, I suggest that you recall the last time the programs where working and go back to the previous backup and restore the files.

Message 3 of 10
pbejse
in reply to: tjm024000


@tjm024000 wrote:

I just switched to AutoCAD 2012. The attached LISP routine worked in 2008, but doesn't work in 2012. Can someone help me out?



Missing "" (quoation) marks on DCL[file Modified]

Missplaced parenthesis on LSP file [Modified]

 

Try it now

 

See atached files

Message 4 of 10
diagodose2009
in reply to: tjm024000

I fix so many errors in your program..

a)I conmvert DCL to LISP with embedding DCL in LISP program

b)I search errors

c)I rename your program LISP to a new name "pp_asdk_tjm024000.lsp"

d)I convert your LISP to C+ADS

I work for your program source (8hours):smileysurprised:

Your program still have errors

You load the the programe "pp_asdk_tjm024000.lsp" and you enter the command Q2  [enter] or (Defun C: Q2 (/ )

If you need fix errors in the "pp_asdk_tjm024000.lsp", please send to me the private message..

 

Message 5 of 10
tjm024000
in reply to: tjm024000

grjcmb: It may be ugly, I can assure you that the routine works in AutoCAD 2008, I just double-checked with the guy who sits next to me and still has 2008.

 

pbejse: I didn't get your LISP to run, but...

 

diagodose2009: Your version worked! I'm sorry it took 8 hours of your time.

 

Thank you all for your help.  Everyone here at the office will appreciate it!

 

Tim Minich

Message 6 of 10
pbejse
in reply to: tjm024000


@tjm024000 wrote:

pbejse: I didn't get your LISP to run, but...

 

 Tim Minich


First of all, its not my lisp code, I would have written it entirely different from what it is now.

 

It works fine when i tested it, (perhaps not thoroughlly  Smiley Very Happy), otherwise i wouldnt have posted the modified code. (kept it really short and simple)

 

Anyhoo. What is the error you're getting when you run the lisp code?

 

Message 7 of 10
tjm024000
in reply to: pbejse

Update on LISP Routine:

 

The updated version by diagdose2009 succesfully opens the dialog box, but otherwise fails to work.

 

pbejse: I just double checked your edit of the program. I made sure that I only have your version loaded. I get the following error messages:

 

"Error in dialog file: (reference location of LISP Routine), line 12: missing semicolon."

 

"Error in dialog file: (reference location of LISP Routine), line 12: invalid attribute, Symbol: "Prefix"

 

"Error in dialog file: (reference location of LISP Routine), line 12: syntax error, Symbol: "Prefix"

 

Are you running AutoCAD 2012? The original routine worked in 2008, but doesn't work in 2012.

 

In case it's not clear to anyone what's supposed to happen (I don't program at all, so I'm not sure how obvious it is), the routine pulls up a dialog box that has a starting number, a prefix, suffix, and number to increase by. After you enter the information & press OK, you can then select text items and it will change the text accordingly. For example, if you have 5 single line text objects, and you set your prefix to F, your starting number at 1, and your increase number to 1, you should be able to click on the first text to change it to F1, then the second to F2, etc. I'm not sure if that helps you guys or not, but that's the goal.

 

Thank you all again for your help.  If you can get this working I'll be forever grateful.

 

TIm Minich

Message 8 of 10
pbejse
in reply to: tjm024000


@tjm024000 wrote:

 

pbejse: I just double checked your edit of the program. I made sure that I only have your version loaded. I get the following error messages:

....

 

Thank you all again for your help.  If you can get this working I'll be forever grateful.

 

TIm Minich


No worries TIm it didnt take me that much time to modify the code. really. 10 minutes to identify the problem and another 5 minutes to modify it.

 

Before the mod, it gives me that error you posted . Just make sure you download the files i posted

 

You can easily recognize the modified file.

on the lsp file

(setq Suffix (get_tile "enteredSuffix"));<-----

on the DCL

label = "Enter a Prefix if desired, ELSE leave blank:"; // <--- labels in quotes ""

 

I editied the file so little  that you wont even recognize the difference.

Anyhooo.. dont worry about it

 

Cheers

Message 9 of 10
tjm024000
in reply to: tjm024000

We have an in-house solution! If you're interested, it's attached.

 

 

Message 10 of 10
pbejse
in reply to: tjm024000


@tjm024000 wrote:

We have an in-house solution! If you're interested, it's attached.

 

 


 You have got to be kidding me tjm024000 Smiley LOL

 

 Did you even looked at the attached code I posted and my previous reply?

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost