AutoCAD Visual LISP / AutoLISP :: Reactor Triggers Fatal Error
Jun 15, 2012
I have created a very basic reactor as a test. As you can see, it doesn't actually do anything other than set a variable so I know the error isn't caused by something I'm doing with the reactor.
(defun np:test (reactor callbackdata / ) (setq abc 123))(if (not np:reactor1) (setq np:reactor1 (vlr-command-reactor nil '((:vlr-commandwillstart . np:test))) ))
OK, so the problem I have found is that if I load this reactor into a drawing and then use the MVSETUP command but escape out without completing the command, AutoCAD throws an error and becomes unusable. When I then close AutoCAD down I am met with multiple unhandled exception errors before the app finally closes.
I then altered the reactor from a vlr-command-reactor to a vlr-editor-reactor and found that with this, I am no longer met with the same error while escaping out of MVSETUP. However, when I close CAD down I am eventually left with an 'AutoCAD Application has stopped working' error dialog on screen which reports that acad.exe as crashed.
I am working on AutoCAD Architecture 2012 (although I have tried it on 2013 to with the same results) on Windows 7 64bit. I have also tried this on ACA2012 x32 and found the same error exists.
I am doing something fundamentally wrong in the way I am handling reactors?
View 9 Replies
ADVERTISEMENT
Nov 4, 2013
I am trying to customize my quick properties (acad.cuix), but i keep on receiving fatal error message. And when i click on quick properties it is all blank. Also, the Properties dialogue box is not working when i click on something, the properties do not appear on the Properties dialogue box. Attached is the error message.
View 3 Replies
View Related
Nov 24, 2011
It is possible to cancel a command using visual lisp reactors. If this is not there another way I could do that. I tried to use UNDEFINE but it works only with own CAD commands and not with Visual Lisp command.
View 1 Replies
View Related
Dec 9, 2011
i am trying to add a reactor to ddatte command, would like to know which object was being edited, the ename or object name (ssget "P") does not seem to be the one
View 5 Replies
View Related
Feb 7, 2012
I use the following code to assign a reactor to an object.
Now I noticed that if I close the dwg file after you successfully saved, when I open even if I load the lisp, the reactor does not work.
Another problem: when I use the command "erase" or "explode" the reactor is started twice, why? you can run it at once?
(setq marReactor (vlr-object-reactor (list (vlax-ename->vla-object oggmar)) "TEST" '( (:vlr-erased . reactor_upd) (:vlr-modified . reactor_upd) ) ))
View 3 Replies
View Related
May 17, 2012
I need ot append events when the dimstyle is change using the AutoCAD dimstyle popup list, but don't know which reactoer to use. I tried with Comman begin and end, and Sysvawill change and changed, but they don't detect the dimstyle changes.
View 2 Replies
View Related
Feb 7, 2012
I use the following code to assign a reactor to an object:
(setq marReactor (vlr-object-reactor (list (vlax-ename->vla-object oggmar)) "TEST" '( (:vlr-erased . reactor_upd) (:vlr-modified . reactor_upd) ) ))
"reactor_upd" is the name of the function that starts every change or delete the object.
I would like to exclude the command "MOVE", ie if I move the object, I do not want that part to the"reactor_upd" function.
View 2 Replies
View Related
Dec 4, 2012
I have the following code to redefine a block after a command has ended:
(vl-load-com);*********************************************************(defun Redefine() (command "_.INSERT" "reactortest=reactortest" nil)(princ "Block redefined."));****************************************(vlr-command-reactor nil '((:vlr-commandEnded . endCommand)));******************************************************(defun endCommand (calling-reactor endcommandInfo / thecommandend) ; Get the name of the command.(setq thecommandend (nth 0 endcommandInfo)); Check name of the command.(cond ((= thecommandend "PLINE") (Redefine)));cond(princ));defun(princ)
It doesn't work because INSERT is an interactive function and can't be called while a reactor is active. Is there another way to redefine a block that can be used in a reactor? The block is in one of the default search path's.
View 2 Replies
View Related
Mar 30, 2012
how can I check whether an object has a reactor connected?
I wrote the following
(defun c:**** (/ ogg collegaReactor) (setq ogg (car (entsel))) (setq collegaReactor (vlr-object-reactor (list (vlax-ename->vla-object ogg)) "NOMEAPP" '( (:vlr-modified . testedit) (:vlr-objectClosed . endedit) ) ) ))(defun testedit (notifier-object reactor-object parameter-list / ogg collegaReactor) (alert "testedit"))(defun endedit (notifier-object reactor-object parameter-list / ogg collegaReactor) (alert "endedit"))
If I start two or three or more times the "c:****" and select the same object, when I changethe "alert" appear several times.
View 8 Replies
View Related
Mar 13, 2012
I open the drawing without loading the function, when I modify an object with the reactors appears the following error message:
function definition: NAMEFUNCTION
You can avoid this annoying message without removing the persistent reactors?
View 3 Replies
View Related
Nov 17, 2013
I need to find a way to find a good replacement for "SAVE" command to use it within Reactor. I want to save A COPY of my current ("active") DWG document to another place *without making it current* (just like command "SAVE" does and did it always). I know I could use (vla-saveAs ...) to save it first to another Folder and then use (vla-save ...) to save it back to its current Folder, but there must be a way to do it simply and fast.
View 9 Replies
View Related
Dec 28, 2011
Does Object Reactor has an owner size limitation?
when the owner size is big (about 1000) trying to disable the reactor (vlr-remove ReactorObj) causes AutoCAD to crash right on spot.
View 5 Replies
View Related
May 18, 2010
I need a Reactor to Modify Xdata - Length - contained in Line Object if this Line is modified (stretched, breaked, trimmed, etc).The routine need to verify if Line contain Xdata and modify it (and works with multiple selection).
I tried for long hours, but without success. I tried to create a list of entities while the reactor is applied, but doing so need another reactor to change these entities after the first Reactor works.The codes I used are below:
{code}
;If it just 1 string only you want to add
(defun add_xdata_str (e a v);;;EName APPID String_value
(and (not (tblsearch "APPID" a))
(regapp a))
(and (= (type e) 'ENAME)
[code]....
View 6 Replies
View Related
Oct 2, 2012
I am using (trying to anyway) a :VLR-xrefSubcommandReloadItem reactor. My only question is how to get the xref/block name from the 'reactor callback data' Object ID.
I am ultimately trying to pass it to (vla-get-xrefdatabase ....), but I cannot figure out how to turn the second parameter from the reactor callback data into something I can use - for example the second parameter returned may be "65" or some other number.
Civil 3D 2011
Windows 7 x64
View 1 Replies
View Related
May 22, 2013
We have a lisp routine that I co-authored ages ago and then haven't done much programming in about 7 years. I seem to have forgotten much of my language skills. This portion of the lisp routine was running fine in autocad 2005 which is what the computer had on it, and it doesn't run on autocad 2010.
I've narrowed it down to the while statement which is why you see it commented out, but that portion is necessary. My main question is was there a change in the language specifically the while statement between 2005 and 2010?
; GET LINES OVER 10" AND THROW OUT (if (= (cdr(assoc 0 outerinfo)) "LWPOLYLINE") (progn (setq remlenouter 0.0) (setq numseg (cdr(assoc 90 outerinfo))) (setq edd (member(assoc 10 outerinfo) outerinfo)) (setq n1 0) ;(while (< n1 (- (* numseg 4) 4)) ;(setq dist (distance (cdr(nth n1 edd)) (cdr(nth (+ n1 4) edd)))) ;(if (>= dist edmmax) (setq remlenouter (+ remlenouter dist))) ;(setq n1 (+ n1 4)) ;) ; end while (setq dist (distance (cdr(nth n1 edd)) (cdr(nth 0 edd)))) (if (>= dist edmmax) (setq remlenouter (+ remlenouter dist))) ) ; end progn ) ; END IF
View 9 Replies
View Related
Apr 16, 2013
So i have almost 30 installs and my custom programs are working in all but this new install. Now when i pick on the tool palette that runs the program, i get a message shown in the attached png, then when i pick "OK" i get "Unable to load dialog box."
I've searched these hallowed halls but all the messages seem to point to 2002 versions of ACAD Map and i'm running plain AutoACAD (that came with Product Design Suite, aka Inventor.)
View 2 Replies
View Related
May 28, 2012
I have made a block with consist of shape drawing and some attribute data that must specified when the block inserted. my question is, how to make "warning error input" appear if mistake input occurs?
View 6 Replies
View Related
Jun 18, 2013
In my acaddoc.lsp I have it load an autoload.lsp file that contains many lisp routines (attached). I am getting the "extra right paren on input" error. It appears to error after the third line in the autoload file "san18"....I removed everything after the third line and no error, I put them back and it errors and only loads first three?
I am using Civil 3D 2014 and I have added all neccesary paths to the trusted locations.
View 4 Replies
View Related
Aug 29, 2011
So i have managed to get my VBA apps working up to version 2010 (with the AcFocusCtrl). I just upgraded to AutoCAD 2012. For some reason I cannot get the ACFocusCtrl on my VBA userform. When I try to drag it onto the userform, I get an error "Class Not Registered". how I can load that control?
View 4 Replies
View Related
Aug 17, 2012
The error below has appeared randomly when AutoCAD 2011 is started. There was not an error of this sort, but it suddenly appeared and some of the LISP routines will no longer work.
*Invalid attempt to access
a compiled function definition. You may want to define it using defun-q:
#<SUBR @000000003f5fda98 S:: STARTUP>
View 1 Replies
View Related
Feb 6, 2007
just test my code about create a stair 3D,still running the program and then appeared a display box,with said "Error analyzing internal islands",what meaning it said?.at attach file with "Error Analysing-1.jpg is the result that program.
View 1 Replies
View Related
Jan 10, 2012
I D/L a lisp file (setvars.lsp) that purports to give a list of system variables that match a short string entered in a dialog box.
Unfortunately, an error arises that says 'error : no function definition: STRNUM'
I've looked at the code and can't tell what the writer was hoping to achieve.
The specific section is as follows:
(if F1
(progn
(setq RL (read-line F1))
(while RL
(if (and (wcmatch (strcase RL) (strcase (strcat "*" DESCR1 "*")))
(wcmatch (strcase RL) (strcase (strcat "*" DESCR2 "*")))
[Code] .........
There is no other mention of STRNUM in the whole of the lisp.
There is an accompanying setvars.dat, wherein apparently, the writer compiled a data file of all the system variables in AutoCAD2008, each variable being followed by an '=' and then a description of the variable.
If necessary I can post the whole lisp and dat file, but was hoping to discover the intention from the above extract and therfore where I might work out an alternative to this line.
Looking to turn a string to a real? If so, why are there two 'arguments' following the 'function' STRNUM?
View 9 Replies
View Related
Aug 17, 2011
I have a problem with "tools/window attributes/configure current"when I try to configure current window (especialy tabulator spaces 8 -> 2) I got fatal error: unhandled access violation Writing 0x0000 Exception at cc424946h
Windows 7 (x64)
AutoCAD 2009, 2010, 2011, 2012
standalone instalation
user with administrator privileges
View 6 Replies
View Related
Jul 23, 2013
My code returns the error, but it still works.
(vl-load-com)
(setvar "cmdecho" 0)
(vlax-for ucs (vla-get-UserCoordinateSystems (vla-get-Activedocument (vlax-get-acad-object)))
(setq UCSList (cons (vla-get-Name ucs) UCSList)))
(setq FileName (vl-Filename-Base (getvar "Dwgname")))
(setq NewUCSList (vl-remove-if '(lambda (x) (vl-string-search FileName x)) UCSList))
(setq Listlength (length NewUCSList))
[code]....
View 4 Replies
View Related
Mar 22, 2012
By running this routine it returns the following error message:
ERROR: bad argument type: VLA-OBJECT 7
(defun _make_tblstyle (stlname / adoc acmcol tblstyle txh)
(setq adoc (vla-get-activedocument
(vlax-get-acad-object))
)
(setq acmcol (vla-getinterfaceobject
[Code] .......
View 3 Replies
View Related
Mar 13, 2012
I've got a subroutine that gets the centroid of a closed polygon (lwpoly). It appears to fail if the polygon has any zero length line segments. I've added a trap that catches the error and "highlights" the offending polygon, but it stops there and does not return to the main function that called the subroutine. Is there a way to get back to the main function from the trap?
Here's the subroutine (original function by _gile (Autodesk LISP Forum 9-18-2006):
(defun return-centroid (lwpoly space / obj Region Centroid)
(setq *error* trap1)
(setq obj (vlax-ename->vla-object lwpoly))
(setq Region (vlax-invoke space 'addRegion (list obj)))
(setq Centroid (trans (vlax-get (car Region) 'Centroid) 1 0))
(vla-delete (car Region))
[code]....
View 2 Replies
View Related
Jul 12, 2012
Is there a lisp that will allow me to do a continuous dimension, but will alternate the dimension position from low, high, low and high? If there is no lisp already created, how to create one?
See Continuous dimension attachment for example.
I work at a glass and glazing company and this is how we dimension mullion width and DLO. See typical window dimensioning attachment for window elevation with dimensions.
View 6 Replies
View Related
Nov 14, 2013
I have a list ("temp.dwg" "temp2.dwg") and would like to add the string "insert text here" into each item in the list resulting in ("insert text heretemp.dwg" "insert textheretemp2.dwg"). how would i go about doing that using LISP?
View 2 Replies
View Related
Oct 7, 2013
Is there a way to programatically set a visual style before a drawing actually opens?
We have some huge models and people seem to forget to change their visual styles back to 2D wireframe before saving and exiting drawings. Some models will crash on some workstations when trying to open in a rendered mode.
I found a lisp with a function that looked to set viewport visual styles. But it does not seem to be supported anymore. --> (vla-put-VisualStyle vport 1)
View 9 Replies
View Related
Oct 11, 2012
I'm trying to write a lisp routine that, when I invoke the mleader command, osmode is set to "nearest" & orthomode is set off. I then would like the original settings to be returned.
attached is what I have written so far:-
View 4 Replies
View Related
Jun 20, 2013
Lisp that switches back on Selection Preview i.e. thickens and highlights lines when you hover over them?I don't know why, but they are always unticking the boxes.
View 4 Replies
View Related