Community
AutoCAD Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LISP will not run

14 REPLIES 14
Reply
Message 1 of 15
Anonymous
2287 Views, 14 Replies

LISP will not run

I am trying to run a lisp routine I have used for some years to incrementally add or edit text

when I load the lisp I ge this error message: 

Renum error: no function definition: VLAX-ENAME->VLA-OBJECT

 

I have tried repiaring the AutoCAd installation, I have even opened a copy of AutoCAD 2015 but I get the same response

14 REPLIES 14
Message 2 of 15
pendean
in reply to: Anonymous

Show us your lisp file... .
Message 3 of 15
rkmcswain
in reply to: Anonymous

Make sure to call (vl-load-com) somewhere at least once before trying to access other VL* functions.

Ref: http://www.afralisp.net/visual-lisp/tutorials/beginning-visual-lisp-part-1.php





R.K. McSwain     | CADpanacea | on twitter
Message 4 of 15
Anonymous
in reply to: pendean

I should make it clear - I didnt write the file, I downladed it about 2 years aga, it worked fine until I tried this week and now I get the error report

this is one of the files that no longer works

 

(defun c:renum (/ oldPref oldSuf oldStart curText curStr
numZeros)
(vl-load-com)

(initget 6)
(setq numZeros (getInt "\nEnter number of 0 prefix's:"))

(defun num2str (num / numStr)
(setq numStr (itoa num))
(If (< (strlen numStr) numZeros)
(repeat (- numZeros (strlen numStr))
(setq numStr (strcat "0" numStr))
)
)
numStr
)

(if(not rnm:Pref)(setq rnm:Pref ""))
(if(not rnm:Suf)(setq rnm:Suf ""))
(if(not rnm:Start)(setq rnm:Start 1))
(setq oldPref rnm:Pref
oldSuf rnm:Suf
oldStart rnm:Start); end setq
(setq rnm:Pref
(getstring T
(strcat "\nPrefix: <"rnm:Pref">: ")))
(if(= "" rnm:Pref)(setq rnm:Pref oldPref))
(if(= " " rnm:Pref)(setq rnm:Pref ""))
(setq rnm:Suf
(getstring T
(strcat "\nSuffix: <"rnm:Suf">: ")))
(if(= "" rnm:Suf)(setq rnm:Suf oldSuf))
(if(= " " rnm:Suf)(setq rnm:Suf ""))
(setq rnm:Start
(getint
(strcat "\nStarting number <"
(itoa rnm:Start)">: ")))
(if(null rnm:Start)(setq rnm:Start oldStart))
(while T
(setq curStr(strcat rnm:Pref(num2Str rnm:Start)rnm:Suf))
(setq curText
(car
(nentsel "\n<<< Pick TEXT, MTEXT or ATTRIBUTE or press Esc to quit >>> ")))
(if
(and
curText
(member(cdr(assoc 0(entget curText))) '("TEXT" "MTEXT" "ATTRIB"))
); end and
(progn
(vla-put-TextString
(vlax-ename->vla-object curText)curStr)
(setq rnm:Start(1+ rnm:Start))
); end progn
(princ "\n This is not DText or MText ")
); end if
); end while
(princ)
); end of c:renum

(princ "\n[Info] http:\\\\www.AsmiTools.com [Info]")
(princ "\n[Info] Renumber tool. Type RENUM to run. [Info]")

Message 5 of 15
Patchy
in reply to: Anonymous

You didn't post the whole thing.

It's working fine for my 2008.

Look at the top part, it said not tested for next versions.

My suggestion is you ask the Customization Group.

 

Capture.JPG

Message 6 of 15
rkmcswain
in reply to: Patchy

It works fine here in AutoCAD 2016. There is nothing in that code version dependent.

 

Full code posted here.

 

 

R.K. McSwain     | CADpanacea | on twitter
Message 7 of 15
Anonymous
in reply to: Patchy

It worked fine in 2012 2013 2015 and up until Tuesday it worked fine in 2016.

this is not the only lisp routine no longer working

 

I am trying to get the Autodesk support to pick this up because i think either an update has fubar'd the scenario or perhaps it's clashing with some other software, antivirus etc.

 

For the record I loaded my copy of 2008 that is still lurking on this m/c and they dont run on that either, or 2012 or 2013 or 2015.

Message 8 of 15
rkmcswain
in reply to: Anonymous

  • Open a new session of AutoCAD where it does not run.
  • Type in the command VLIDE.
  • This will open the Visual Lisp Editor.
  • Open the lisp file in here.
  • Go to the Tools menu, and choose "Load text in Editor".
  • After you do this, press the F6 key (and/or choose the Windows pull-down, then Visual Lisp Console - note that this window may be partially hidden behind another window. Just find it.)
  • It should say something like "; 3 forms loaded from......"
  • If so, switch back to AutoCAD and try to run the command RENUM.
  • When it fails, switch back to the VLIDE.
  • Inside the VLIDE, go to the View menu, choose "Error Trace".
  • A small window will pop up.
  • Screencap that and post it.



R.K. McSwain     | CADpanacea | on twitter
Message 9 of 15
Anonymous
in reply to: rkmcswain

no joy - error trace atached

 

<1> :ERROR-BREAK
[2] (VLAX-ENAME->VLA-OBJECT <Entity name: 7ffffb24ed0>)
[3] (C:RENUM)
<4> :CALLBACK-ENTRY
<5> :ARQ-SUBR-CALLBACK

 

I aparantlry am not worthy to be able to paste a screen dump   

Message 10 of 15
Patchy
in reply to: Anonymous

You're asking your question in the wrong place.

If it work before and not anynore, reset your autocad back to default, repair it or reinstall it.

If that isn't what you you want to do, then ask the people that know how to fix, they are here:

 

http://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/bd-p/130

Message 11 of 15
rkmcswain
in reply to: Anonymous

paul wrote:

no joy - error trace atached

 

<1> :ERROR-BREAK
[2] (VLAX-ENAME->VLA-OBJECT <Entity name: 7ffffb24ed0>)
[3] (C:RENUM)
<4> :CALLBACK-ENTRY
<5> :ARQ-SUBR-CALLBACK

 

Presuming that the entity is valid, then yes, it appears that (vlax-ename->vla-object) is failing for some reason.

Since it's happening on all installs of AutoCAD, that makes me feel like this is a machine issue - like maybe a .DLL is being blocked by AV or something?

Are other computers in your office having the same problem? At the same time?

R.K. McSwain     | CADpanacea | on twitter
Message 12 of 15
Anonymous
in reply to: rkmcswain

Patchy

 

Please

 

1. read my post fully - I have repaired/reinstalled etc

2. If you have nothing constructive to add, dont.

Message 13 of 15
Patchy
in reply to: Anonymous

Well don't crawl over to customization group then.

Message 14 of 15
Anonymous
in reply to: rkmcswain

 

rkmcswain

 

I work from home, and am awaiting delivery of a new(new) machine, which I have had to return twice because it keeps arriving with the wrong software loaded, meanwhile I am keeping this one going with bailer twine and gaffer tape.

 

If it's a PC issue then I was hoping the "official" bods might know what the clash was, I have seen similar wih Acrobat in the past and had to delete some f its dll files. We run AVG anti-virus & use dropbox for file sharing, so whatever is causing this is recent.

 

I am having to manually label chainage markers on a few miles of rail as the surveys are no good in Civils 3D and I am forced back ito flat world. Hence my gruntle is a bit dissed and the lack of macros isn't helping.

 

thanks for your efforts, we shall see if a completely new build resolves it i guess.

Message 15 of 15
Victoria.Studley
in reply to: Anonymous

Hi @Anonymous,

 

Thank you for posting your question here in the community forum.

 

The error you're encountering typically indicates an issue with the installation, caused by system cleanup tools. Do you use any registry cleaners or system cleanup programs? As @rkmcswain suggested, perhaps your antivirus program is interfering?

 

Typically, a repair of the AutoCAD installation should do the trick, however if the program that caused the error to begin with is still interfering, it's likely it will continue to do so until you disable it. Since you've already tried repairing the installation, if you repair or reinstall, be sure to disable any antivirus, security, registry cleaner, or system cleanup tools before doing so.


Victoria Studley
Principal Experience Designer - Fusion Configurations
Join us in the Fusion Insider Program
Fusion Learn & Support | Fusion Documentation

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

Post to forums  

AutoCAD Inside the Factory


Autodesk Design & Make Report