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

LISP routine no longer working in AutoCAD 2014, not sure why

11 REPLIES 11
SOLVED
Reply
Message 1 of 12
morrissette
2993 Views, 11 Replies

LISP routine no longer working in AutoCAD 2014, not sure why

One of our users has recently upgraded from AutoCAD 2005 to AutoCAD 2014. He has a LISP routine that will no longer work and I'm not sure why. I'm not a LISP expert and would appreciate anyone looking at the small file and seeing if the problem area can be identified.

 

Very much obliged,

Jody in NH

11 REPLIES 11
Message 2 of 12
BlackBox_
in reply to: morrissette

This may be of use:

 

http://forums.autodesk.com/t5/Visual-LISP-AutoLISP-and-General/Enable-LISP-in-AutoCAD-2014/m-p/39121...



"How we think determines what we do, and what we do determines what we get."

Message 3 of 12
morrissette
in reply to: BlackBox_

Thank you blackbox, but it doesn't seemed to have helped. I followed the steps suggested in your reply.

Message 4 of 12
BlackBox_
in reply to: morrissette

No worries; that was only one commonly overlooked place to start, especially when stepping up to 2014 from anything older than 2013 SP1.

 

Does the routine load properly?

 

Is the user able to start the routine, and it errors out?

 

What error message is reported to the command line (if any)?

 

... We'll need more information to know the exact cause.

 

 

 

FWIW - The code you posted could use some localized variables; not sure if that's what's causing the issue, but is typically a no-no (to use all global variables, particularly those with such common symbol naming). I'll see if I cannot offer a quick rewrite later.

 

Cheers



"How we think determines what we do, and what we do determines what we get."

Message 5 of 12
Kent1Cooper
in reply to: morrissette


@morrissette wrote:

One of our users has recently upgraded from AutoCAD 2005 to AutoCAD 2014. He has a LISP routine that will no longer work ....


I don't have 2014 here, but I can see a couple of possibilities:

 

Might the Leader command no longer be accepted as a sub-command within DIM?  LEADER is a command of its own, though there's been support for it as a sub-command that may now have disappeared.  Might DIM itself no longer be a command in 2014, since all its sub-command possibilities are now top-level commands?

 

Might any of the commands used have been redefined by some vertical/overlay program?  Preceding command names with a period/decimal will force it to use the native non-redefined commands, and while you're at it you may as well do what's done with a lot of code posted here: also precede them with an underscore to make them usable in non-English versions of AutoCAD.

 

Try changing

"LAYER" to "_.LAYER" [all instances]

and

"CIRCLE" to "_.CIRCLE"

and

"TEXT" to "_.TEXT"

and

"DIM" "LEADER" to just "_.LEADER"

and remove the "EXIT" that gets it out of the DIM command.

 

You may also need to look at the answers to prompts in the Leader command -- I expect you might be better off going for "None" annotation, rather than apparently a single-space text string [might it be that that no longer survives as a drawing entity, but disappears and is no longer available as (entlast)?], and somehow referencing the Marker location from the Leader itself.

Kent Cooper, AIA
Message 6 of 12
hmsilva
in reply to: morrissette


@morrissette wrote:

One of our users has recently upgraded from AutoCAD 2005 to AutoCAD 2014. He has a LISP routine that will no longer work and I'm not sure why. I'm not a LISP expert and would appreciate anyone looking at the small file and seeing if the problem area can be identified.

 

Very much obliged,

Jody in NH


Jody,
the code worked correctly in AutoCAD 2005?


Try the attached code, and please let me know if it works correctly.

 

HTH

Henrique

 

EESignature

Message 7 of 12
morrissette
in reply to: hmsilva

Thanks very much to all of the responses. Henrique, it worked and a huge thanks to you. Very much obliged.

 

Jody

Message 8 of 12
hmsilva
in reply to: morrissette

You're welcome, Jody
Glad I could help

Henrique

EESignature

Message 9 of 12
morrissette
in reply to: hmsilva

Henrique, I'm curious and intended to ask you.....are you able to explain to me in simple terms what the difference is and what caused it to bomb out before your fix?

 

Sincerely,

Jody in NH

Message 10 of 12
hmsilva
in reply to: morrissette

Jody,

 

the change I made at the code is commented...

From the code:

  (command "LAYER" "M" "DIM" "" "DIM" "LEADER" PT1 PT2 "" " " "EXIT")

  ;; added to delete the laste entity, an empty string from the DIM/LEADER command,
  ;; so the code be able to select the last line in the leader...
  (entdel (entlast))


Now the last entity, is the last line drawn from dim/leader command...

 

Henrique

 

 

EESignature

Message 11 of 12
morrissette
in reply to: hmsilva

Thanks so much for the reply Henrique. i neglected to see to commented section within the routine prior to asking you.

 

Merci beaucoup!

Jody

Message 12 of 12
hmsilva
in reply to: morrissette

You're welcome, Jody

Henrique

EESignature

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

Post to forums  

Autodesk Design & Make Report

”Boost