All Activity
- Past hour
-
leonucadomi started following add new scale to list...
-
hello: I'm trying to make a routine that adds new scale to my viewports I want the routine to only ask me a scale number. example . 20 and it generated the scale 1:20 and so on for others I started with this code but something happens and it doesn't work (defun c:EVP3 (/ ESC ESC2) (setq old_err *error*)(defun *error* ( a / )(princ "") (setq *error* old_err)(princ)) (setvar "cmdecho" 0) (setq ESC (getreal "\nIndica la escala: ")) (setq ESC2 (strcat "1" ":" ESC)) (command "_-SCALELISTEDIT" "A" ESC2 ESC2 "E") (princ) );fin defun enlighten me masters ... please thanks
-
You can put the prompts in the getpoint. Note the \n this is make a new line on command prompt. (prompt "Specify the first point of the rectangle: ") (setq p1 (getpoint)) (prompt "Specify the opposite point of the rectangle: ") (setq p2 (getcorner p1)) ; *** rlx (setq p1 (getpoint "\nSpecify the first point of the rectangle: ")) (setq p2 (getcorner p1 "\nSpecify the opposite point of the rectangle: ")) ; *** rlx
- Today
-
Just be aware a 3dface is normally 4 points, making a 3dpoly with 3 sides is a different object so import to CIV3D etc may not work without extra steps.
-
I use Bricscad and it found an open Access, maybe some one else with ACAD can check. (setq Access (vl-catch-all-apply 'vlax-get-or-create-object '("Access.Application"))) (vlax-put-property Access 'Visible :vlax-true)
-
Lee Mac started following Rectangle-Revcloud show the frame
-
Another - (defun c:rectrevclcol ( / cec ) (setq cec (getvar 'cecolor)) (setvar 'cecolor "2") (initcommandversion) (vl-cmdf "_.revcloud" "_a" 500 "_r") (while (= 1 (logand 1 (getvar 'cmdactive))) (vl-cmdf "\\")) (setvar 'cecolor cec) (princ) )
-
Super! Right in the bull's-eye! Thanks! **** (defun c:RectRevClCol (/ p1 p2 ssRect ssCloud) (prompt "Specify the first point of the rectangle: ") (setq p1 (getpoint)) (prompt "Specify the opposite point of the rectangle: ") (setq p2 (getcorner p1)) ; *** rlx (command "_.RECTANGLE" p1 p2) (setq ssRect (ssget "_L")) (if ssRect (progn (command "_REVCLOUD" "_Object" ssRect "" "_ArcLength" "500" "") (setq ssCloud (ssget "_L")) (if ssCloud (command "_.CHPROP" ssCloud "" "_Color" "2" "") ) ) ) (princ) )
-
rlx started following Rectangle-Revcloud show the frame
-
or instead of using (setq p2 (getpoint p1)) try (setq p2 (getcorner p1))
-
Steven P started following Rectangle-Revcloud show the frame
-
Might have to study GrRead and GrDraw to do that.
-
I would like to see the frame when drawing the rectangle, as in the standard autocad command. If you only call the RECTANGLE command without passing points to it, then AutoCAD will enable the standard interactive construction. If you remove from the line (command "_.RECTANGLE" p1 p2) p1 and p2 (command "_.RECTANGLE"), then the code does not work further, that is, the cloud is not drawn. (defun c:RectRevClCol (/ p1 p2 ssRect ssCloud) (prompt "Specify the first point of the rectangle: ") (setq p1 (getpoint)) (prompt "Specify the opposite point of the rectangle: ") (setq p2 (getpoint p1)) (command "_.RECTANGLE" p1 p2) (setq ssRect (ssget "_L")) (if ssRect (progn (command "_REVCLOUD" "_Object" ssRect "" "_ArcLength" "500" "") (setq ssCloud (ssget "_L")) (if ssCloud (command "_.CHPROP" ssCloud "" "_Color" "2" "") ) ) ) (princ) )
-
Have you tried CadTools?
-
Hi I found a solution, started my hollidays, and forgot to post here. SORRY! @BlackBox, I think you misunderstood. The problem is that if you try to open another application from AutoCAD Lisp code on the same PC (not on another PC, nor with another user: I'm the only user on my PC), administrator privileges are likely required. @BIGAL vlax-get-or-create-object doesn't seem to be able to control an already running application. At least I couldn't do it with an already open Access instance. In the end, I resigned myself to the idea that it's not possible to control a running Access instance and just considered creating a new instance. Thanks everyone for the help.
- Yesterday
-
Another option: Keeping the original entity and removing any repeated points along the 3D polyline. (defun supriPts3DPol (e / l p lp vlae) (setq vlae (vlax-ename->vla-object e)) (while (/= (cdr (assoc 0 (setq l (entget (setq e (entnext e)))))) "SEQEND") (if (not (equal (setq p (cdr (assoc 10 l))) (car lp) 1e-4)) (setq lp (cons p lp))) ) (vlax-put vlae 'Coordinates (apply 'append (mapcar '(lambda(p) (mapcar 'float p)) lp))) )
-
Amuthan1121 joined the community
-
I am working with point cloud data in AutoCAD and facing difficulty cleaning unnecessary points. When using crop or section tools in top view, the ceiling and floor points also get removed. Is there a way to create a true limit box, similar to Trimble RealWorks, that allows selective cleaning?, i can only use autocad, it is a assignment
-
ADASDASD joined the community
-
mhupp started following switch to turn on or off a variable
-
switch to turn on or off a variable
mhupp replied to leonucadomi's topic in AutoLISP, Visual LISP & DCL
Another way not as compact but a little easier to read/follow. Would also handle if uscfollow wasn't 1 or 0 Tho i don't know when/if that would ever happen. ;; Toggle UCSFOLLOW using COND (defun c:foo (/ v) (setq v (getvar "UCSFOLLOW")) (cond ((= v 1) ;; If it's currently ON turn it OFF (setvar 'UCSFOLLOW 0) (princ "\nUCSFOLLOW Desactivado") ) ((= v 0) ;; If it's currently OFF turn it ON (setvar "UCSFOLLOW" 1) (princ "\nUCSFOLLOW Activado") ) (T ;; If it’s some unexpected value, default to OFF (setvar "UCSFOLLOW" 0) (princ "\nUCSFOLLOW Desactivado") ) ) (princ) ) -
sferreira_pcts.pt joined the community
-
Modify and Duplicate Objects in AutoCAD: Autodesk Foundations
The AutoCAD Blog posted a topic in AutoCAD Blogs
When working in AutoCAD, you’ll likely modify or duplicate objects more often than create new ones. To modify and duplicate objects, AutoCAD offers a wide range of options to select objects, giving you the flexibility to meet your needs. Today, we’ll look at a few ways to select, modify and duplicate objects. For the full tutorial, check out the AutoCAD Foundations article. Let’s start with a few quick tips to get you started. How to Select Multiple Objects First things first! You’ll need to select objects before you can modify or duplicate them. You can select multiple objects in an area by clicking an empty location (#1 in image), moving your cursor right or left, and then clicking a second time (#2 in image ). Based on the direction you select objects, you define a crossing or window selection. With a crossing selection, any objects within or touching the green area (in image below) are selected. With a window selection, only the objects completely contained within the blue area (also illustrated in image below) are selected. How to Erase Objects in AutoCAD As a design evolves, some objects that were previously added may no longer be needed. To remove an object, first select it by positioning the pickbox over the object and clicking. The pickbox appears at the center of the crosshairs when no command is active, or as a simple square cursor when a command is active and you’re being prompted to select objects. When objects are selected, they form a selection set, which is the group of objects that will be removed. Quick Tip: The most recently erased objects can be restored with the OOPS command. So if you created or modified any objects after erasing objects, those erased objects can be restored without undoing other recent changes. How to Move Objects in AutoCAD Moving objects in a drawing is one of the most basic ways to modify objects. Simply select the objects to be moved and then specify a base point followed by a second point to determine the distance and direction of the move. How to Duplicate Objects in AutoCAD You will often want to duplicate and reuse elements of your design. To do this, follow the same steps used to move objects: select the objects you want to duplicate, then specify two points to define where the new objects should be created. Advance to New Levels This just scratches the surface of selecting, modifying, and duplicating objects in AutoCAD. Get to the next level by learning how to rotate and scale; offset; mirror; trim and extend; fillet and chamfer; stretch; and more in the AutoCAD Foundations: Select, Modify, and Duplicate Objects article. The post Modify and Duplicate Objects in AutoCAD: Autodesk Foundations appeared first on AutoCAD Blog. View the full article -
there are lots of cases in which source civil 3D files are not given . then recalculating and updating the tables will be like a nightmare.
-
nike497 joined the community
-
GAVAD NORY joined the community
-
ahsattarian28 joined the community
-
virvabook joined the community
-
Get a list of used AutoLISP commands
GLAVCVS replied to Nikon's topic in AutoLISP, Visual LISP & DCL
I thought that perhaps I explained poorly about the reason why my code needs to be loaded before the Lisp commands it must monitor: THE PURPOSE. If the purpose is to identify which commands have been used in order to remember in the future which files need to be loaded, it makes no sense to remember commands such as DDSELECT, SAVEALL, PSTSCALE, BCOUNT, BURST ... etc. that AutoCAD always loads by default. That is, the only ones that need to be remembered are those that the user loaded and used at their own discretion. To distinguish between the two, it is considered that the symbols returned by atoms-family at the moment the code is loaded are AutoCAD’s default ones, which should not be monitored. All the other symbols that do not appear in that initial "snapshot" WILL BE MONITORED. In this way, by saving only the custom commands, it will be more feasible to complement this tool with another one that searches for and loads those commands from a predetermined directory that the user designates for that purpose. -
Kitchen Design Pointers
Harborview_kitchens replied to PaulMacAD89's topic in AutoCAD Beginners' Area
I can definitely relate to what you’re experiencing. Jumping from 2020 Design or Chief Architect into full AutoCAD can feel like going back in time, but there are ways to make it a lot more efficient. Dynamic Blocks: These are a huge time saver once you set them up. You can create cabinet blocks with adjustable dimensions, door swings, and drawer options so you’re not redrawing the same thing every time. Block Libraries: Build a catalog of common cabinet sizes, appliances, and fixtures. Organize them by layer/line type so they’re consistent with company standards but quick to drop in. Layer States / Filters: If the company already uses strict layer standards, you can make templates or saved states so you’re not manually setting them each time. Annotative Objects: For text, dimensions, and hatches, using annotative scaling can save a ton of headaches when producing multiple plan sets. Xrefs: If multiple trades are involved, external references can help you keep drawings cleaner while still coordinating. It might take some upfront setup, but once you have a library and dynamic blocks in place, the workflow will be much smoother. It also shows initiative if you build tools that others on the team can reuse. -
Harborview_kitchens joined the community
-
jlhp joined the community
- Last week
-
Like @Lee Mac a simple change layouts script file. (command "Script" "myviews") (setvar 'ctab "D01") zoom e delay 500 (setvar 'ctab "D02") zoom e delay 500 (alert "All done")
-
Agree with @CyberAngel press a button and get volumes again. Yes may have to add sections in the road for change of shape. Again software like Civil Site Design allows multi string design so small sections of road can be changed and auto volumes then. Think Bus bays & turn slots.
-
arian joined the community
-
Get a list of used AutoLISP commands
GLAVCVS replied to Nikon's topic in AutoLISP, Visual LISP & DCL
Yes. It's an option -
******************************************************************** When I use lisp commands, I always wish the developers all the best. Thank you so much for your hard work and enthusiasm. Thanks to your programs, routine work turns into pleasure. And it takes much less time to create drawings. ********************************************************************
-
switch to turn on or off a variable
GLAVCVS replied to leonucadomi's topic in AutoLISP, Visual LISP & DCL
Another way, taking advantage of @Lee Mac's idea and condensing an output message for the user (defun c:sf (/ v) (princ (strcat "\n*** " (setq v "UCSFOLLOW") (nth (setvar v (- 1 (getvar v))) '(" desactivado" " activado")))) (princ) ) -
I issuing several commands in LISP during the session before saving. *** I've started the last reactor. Thanks a lot, the code works!
-
Get a list of used AutoLISP commands
Lee Mac replied to Nikon's topic in AutoLISP, Visual LISP & DCL
Update to aggregate the logs - (defun init ( ) (foreach grp (vlr-reactors :vlr-command-reactor :vlr-lisp-reactor) (foreach rtr (cdr grp) (if (= "lisp-commands" (vlr-data rtr)) (vlr-remove rtr) ) ) ) (setq lisp-command-list nil) (vlr-command-reactor "lisp-commands" '((:vlr-commandwillstart . onsave))) (vlr-lisp-reactor "lisp-commands" '((:vlr-lispwillstart . onlisp))) (princ) ) (defun onsave ( rtr arg / ent enx idx lyr mts sel str ) (setq lyr "lisp-commands") (cond ( (not arg)) ( (not (wcmatch (setq arg (strcase (car arg))) "SAVE,QSAVE,SAVEAS"))) ( lisp-command-list (if (setq sel (ssget "_X" (list (cons 8 lyr)))) (repeat (setq idx (sslength sel)) (setq idx (1- idx) ent (ssname sel idx) enx (entget ent) ) (if (= "MTEXT" (cdr (assoc 0 enx))) (setq mts (cdr (assoc 1 enx))) ) (entdel ent) ) ) (if mts (setq lisp-command-list (mergelists (parsetext mts) lisp-command-list))) (setq str "") (foreach itm (vl-sort lisp-command-list '(lambda ( a b ) (> (cdr a) (cdr b)))) (setq str (strcat str "\\P" (car itm) "\t\t" (itoa (cdr itm)))) ) (makelayer lyr) (entmakex (list '(0 . "MTEXT") '(100 . "AcDbEntity") '(100 . "AcDbMText") '(010 0.0 0.0) (cons 1 (substr str 3)) (cons 8 lyr) ) ) (setq lisp-command-list nil) ) ) (princ) ) (defun onlisp ( rtr arg / fun itm ) (cond ( (not arg)) ( (wcmatch (setq arg (strcase (car arg))) "~(C:*)")) ( (setq fun (substr arg 4 (- (strlen arg) 4)) itm (assoc fun lisp-command-list) ) (setq lisp-command-list (subst (cons (car itm) (1+ (cdr itm))) itm lisp-command-list)) ) ( (setq lisp-command-list (cons (cons fun 1) lisp-command-list))) ) (princ) ) (defun makelayer ( lay ) (if (not (tblobjname "layer" lay)) (entmake (list '(0 . "LAYER") '(100 . "AcDbSymbolTableRecord") '(100 . "AcDbLayerTableRecord") '(070 . 0) (cons 2 lay) '(062 . 8) '(290 . 0) ) ) ) ) (defun parsetext ( str / pos ) (cond ( (setq pos (vl-string-search "\\P" str)) (append (parsetext (substr str 1 pos)) (parsetext (substr str (+ pos 3)))) ) ( (setq pos (vl-string-position 9 str)) (list (cons (substr str 1 pos) (atoi (substr str (+ pos 3))))) ) ) ) (defun mergelists ( ls1 ls2 / ass ) (if (< (length ls1) (length ls2)) (mapcar 'set '(ls1 ls2) (list ls2 ls1)) ) (foreach itm ls2 (if (setq ass (assoc (car itm) ls1)) (setq ls1 (subst (cons (car itm) (+ (cdr ass) (cdr itm))) ass ls1)) (setq ls1 (cons itm ls1)) ) ) ls1 ) (vl-load-com) (init)