All Activity
- Past hour
-
Get a list of used AutoLISP commands
GLAVCVS replied to Nikon's topic in AutoLISP, Visual LISP & DCL
The code needs to be loaded before any other code you need to memorize. For this reason, saving it at the beginning of the "acad2021.lsp" file allows the code to control other programs loaded later from the same "acad2021.lsp" or "acad2021Doc.lsp." If you load it after other files, it will discard any previously loaded Lisp commands and only consider those loaded later. Therefore, yes, you can save it in a separate file and load it whenever you need, but you must be aware of this condition. Are you willing to accept it? -
I have ACADLSPASDOC=0. I have another question: Is it possible to use your code as a separate reactor without adding it to the acad20##.lsp file?
-
I can't understand why your code (defun init ( )... it doesn't work for me. Is there a problem with the localization of Autocad? Do I need to change this line?: ( (not (wcmatch (setq arg (strcase (car arg))) "SAVE,QSAVE,SAVEAS"))) to ( (not (wcmatch (setq arg (strcase (car arg))) "SAVE,QSAVE,SAVEAS,_SAVE,_QSAVE,_SAVEAS"))) Or something else? Can anyone check the code?
- Today
-
This might be a stupid question, but could it be easier to generate the table all over again? In some cases (especially with Civil 3D) it's faster to start over than to try editing the table.
-
nubrinnah joined the community
-
Get a list of used AutoLISP commands
GLAVCVS replied to Nikon's topic in AutoLISP, Visual LISP & DCL
In theory, it should be that way. But in practice, it's not. At least not for me. ClipLM.mp4 Can anyone else on this forum say that the same thing is happening to them? -
these tables are produced by Civil 3D but after exporting section view , you cant updates material tables automatically. sometimes you have to change some areas manually and you need to recalculate volumes and also make corrections to cumulative volumes as well. I myself have written two separate lisps to do that but it need lots of clicks on the tables. I think it wont be very difficult for experts to define the right arrays to read source data and do recalculations and replace all volumes automatically.
-
Get a list of used AutoLISP commands
Lee Mac replied to Nikon's topic in AutoLISP, Visual LISP & DCL
Not just those reactors created "with the previous code", but any reactor defined by any program - this is risky. You cannot guarantee that it runs before any other application is loaded. -
Get a list of used AutoLISP commands
Lee Mac replied to Nikon's topic in AutoLISP, Visual LISP & DCL
The acad20##.lsp and acad20##doc.lsp files should not be modified - these are reserved for the application. Instead, you should create your own acad.lsp and acaddoc.lsp files. Note that, by default, acad.lsp will be loaded once per session, and acaddoc.lsp will be loaded per document (unless ACADLSPASDOC=1, in which case acad.lsp will also be loaded per document). -
Get a list of used AutoLISP commands
Lee Mac replied to Nikon's topic in AutoLISP, Visual LISP & DCL
As I noted in my earlier post: There are no prompts, no commands - the text is output to the drawing when the drawing is saved. -
I quickly tested the code. And it works perfectly! Thank you very much!
-
I saved the reactor with the name onlispsave.lsp, uploaded it to autocad and added it to the startup. But when I close the drawing, there is no reaction to the output of the lisps used. That's why I asked how to use this reactor properly. I use reactors. MTEditReactorV1-1.lsp. And a reactor to create layers for DIM, PLINE, HATCH, LEADER... But in the codes of these reactors there are such lines: (defun c:mteditreactoron nil (defun c:mteditreactoroff nil LISPLogV1-0.lsp (defun c:LispLogON nil (defun c:LispLogOFF nil These reactors are working well for me.
-
soheil joined the community
-
Open named viewports with lisp
Dayananda replied to Dayananda's topic in AutoLISP, Visual LISP & DCL
finally I wrote a script. Now I want to add delay between each views 1954 delay 1955 etc. ^C^C_-view;R;1954;1955; -
Open named viewports with lisp
Dayananda replied to Dayananda's topic in AutoLISP, Visual LISP & DCL
It can open in view command. I need to feed relevant names one after another including delay function. - Yesterday
-
Get a list of used AutoLISP commands
GLAVCVS replied to Nikon's topic in AutoLISP, Visual LISP & DCL
@Nikon PS: I think it’s better if you copy the code into "acad2021.lsp" and not into "acad2021Doc.lsp" because the content of the latter is loaded afterwards. -
Get a list of used AutoLISP commands
GLAVCVS replied to Nikon's topic in AutoLISP, Visual LISP & DCL
Yes I know. 'vlr-remove-all' is executed during loading so that any reactor created with the previous code is erased. It was a quick solution. Additionally, it runs when the drawing is exited or at startup before any other application loads, so it would only affect those reactors that should remain between drawings. I assumed that Nikon does not use these reactors. But it is probably a risky assumption. So I guess I am "obliged" to fix it. Below, a solution that keeps the reactors even if the drawing closure is canceled, that respects any reactor created by another application, and that regenerates them in each drawing. (defun fota (/ arch cad cmd mens etq letq n er lx) (defun pregunta (a b / cad) (cond ((member (strcase (car b)) '("CLOSE" "_CLOSE" "QUIT" "_QUIT" "EXIT" "_EXIT")) (if (and *lstCmds* (setq mens (cmdsCargados)) (= (vlax-invoke-method (vlax-create-object "wscript.shell") 'popup "Print commands on screen?" 0 "Save commands name" 4) 6) ) (progn (vla-AddMText (vla-get-modelspace (vla-get-activedocument (vlax-get-acad-object))) (vlax-3d-point (getpoint "\nInsertion point...")) 100 mens) (vlax-invoke-method (vlax-get-acad-object) 'Update) ) ) ) ((= (type a) 'VLR-Lisp-Reactor) (if (not (member (setq cad (substr (car b) 4 (- (strlen (car b)) 4))) *lstCmds*)) (setq *lstCmds* (cons (substr (car b) 4 (- (strlen (car b)) 4)) *lstCmds*)) ) ) ) ) (setq letq '("Nikon1" "Nikon2") *afI* nil) (foreach r (vlr-reactors) (foreach er (cdr r) (if (member (setq etq (vlr-data er)) letq) (if (wcmatch etq "Nikon1,Nikon2") (setq lx (cons er lx)) ) ) ) ) (if lx (foreach r lx (vlr-remove r))) (foreach sim (atoms-family 0) (if (wcmatch (setq cmd (strcase (vl-princ-to-string sim) T)) "c:*") (setq *afI* (cons sim *afI*)) ) ) (setq *r* (vlr-command-reactor "Nikon1" '((:vlr-commandwillStart . pregunta)))) (setq *r1* (vlr-lisp-reactor "Nikon2" '((:vlr-lispwillstart . pregunta)))) ) (defun cmdsCargados (/ cad) (setq *cadCmds* nil) (foreach sim (atoms-family 0) (if (not (member sim *afI*)) (if (and (wcmatch (setq cad (strcase (vl-princ-to-string sim) T)) "c:*") (member (strcase (substr cad 3)) *lstCmds*) ) (setq *cadCmds* (strcat (if *cadCmds* (strcat *cadCmds* "\n") "\\C1Comandos utilizados durante la sesi贸n:\\C256\n") (substr cad 3))) ) ) ) *cadCmds* ) (fota) -
Nice one Bigal, Thank you!
-
Not sure if this is useful it tracks all commands used in a session Productivity_Analysis_Tool.lsp
-
Not sure if the lisp by YMG will read 3dfaces. CIV3d will do it same with other civil packages like Civil Site Design.TriangV0.6.7.LSP
-
The probable answer is CVPORT but how are you making the animation ? You can in a lisp change layouts and viewports use the DELAY command to slow down the changing between layouts etc.
-
If this is Road pavement volumes then may need CIV3D or Civil Site Design which have volume reports which include volume & area between chainages.
-
Get a list of used AutoLISP commands
Lee Mac replied to Nikon's topic in AutoLISP, Visual LISP & DCL
There are no commands - just load it, use a few LISP commands, and then save your drawing. -
Get a list of used AutoLISP commands
Lee Mac replied to Nikon's topic in AutoLISP, Visual LISP & DCL
Yes I suppose if the log is to be maintained continuously, existing content could be parsed and updated accordingly - if more than just the OP are using this code, I'll look to update it. -
Break command specifying first point is not working. Lisp
BIGAL replied to cadnub's topic in AutoCAD LT
I don't understand, if your just picking two points why are you not just doing (command "_.BREAK" "0,0.3" "0,-0.3") -
Thank you Tsuky, works exactly as i needed.
-
Hi, With your drawing, this code will correct the polylines. To be adapted if used in another drawing (ssget filter) (vl-load-com) (defun c:Correct3DPL ( / ss AcDoc Space nb n ename obj l_pt lay new_obj) (setq ss (ssget "_X" '((0 . "POLYLINE") (67 . 0) (8 . "CTL_PNT") (66 . 1) (70 . 9)))) (cond (ss (setq AcDoc (vla-get-ActiveDocument (vlax-get-acad-object)) Space (if (= 1 (getvar "CVPORT")) (vla-get-PaperSpace AcDoc) (vla-get-ModelSpace AcDoc) ) nb 0 ) (repeat (setq n (sslength ss)) (setq ename (ssname ss (setq n (1- n))) obj (vlax-ename->vla-object ename) l_pt (vlax-get obj 'Coordinates) lay (vlax-get obj 'Layer) ) (cond ((eq (length l_pt) 12) (vla-delete obj) (setq new_obj (vlax-invoke Space 'Add3dPoly (cdddr l_pt))) (vla-put-Closed new_obj :vlax-true) (vla-put-Layer new_obj lay) (setq nb (1+ nb)) ) ) ) (princ (strcat "\n" (itoa nb) " polylines corrected.")) ) ) (prin1) )