Jump to content

Leaderboard

  1. BIGAL

    BIGAL

    Trusted Member


    • Points

      27

    • Posts

      20,303


  2. SLW210

    SLW210

    Moderator


    • Points

      20

    • Posts

      11,890


  3. Lee Mac

    Lee Mac

    Trusted Member


    • Points

      19

    • Posts

      21,109


  4. Steven P

    Steven P

    Trusted Member


    • Points

      15

    • Posts

      3,067


Popular Content

Showing content with the highest reputation since 11/03/2026 in all areas

  1. A couple of points to make: The need to create thousands of variables on-the-fly typically points to poor program design; in almost every case, a list is more suitable. Setting all such variables to nil at the end of the program does clear them from the document namespace, but consider that you are essentially creating & clearing global variables that are not local to the scope of your program, and as such, the variable names could potentially clash with identically named variables in the document namespace - this is generally considered bad practice.
    6 points
  2. A contrived exercise to demonstrate the performance considerations: (defun foo1 ( lst ) (vl-sort lst (function (lambda ( s1 s2 ) (compare (splitstr s1) (splitstr s2)) ) ) ) ) (defun foo2 ( lst ) (mapcar '(lambda ( n ) (nth n lst)) (vl-sort-i (mapcar 'splitstr lst) 'compare) ) ) (defun compare ( l1 l2 / x y ) (while (and l1 l2 (= (setq x (car l1)) (setq y (car l2)))) (setq l1 (cdr l1) l2 (cdr l2) ) ) (cond ( (null l1)) ( (null l2) nil) ( (and (numberp x) (numberp y)) (< x y) ) ( (numberp x)) ( (numberp y) nil) ( (< (strcase x) (strcase y))) ) ) (defun splitstr ( str ) (read (strcat "(" (vl-list->string (apply 'append (mapcar (function (lambda ( a ) (if (< 47 a 58) (list a) (list 34 a 34) ) ) ) (vl-string->list str) ) ) ) ")" ) ) ) _$ (setq mylist (makelist 100)) ("byo547swd" "niq983ocu" "aca823vdk" "wtq568rur" "phi902niq" "bjh526uzd" "rji359jxn" "qqv937rwf" "tug083pja" "gad189ena" "lte537pir" "laa124lqe" "pjd997nvz" "opt105nif" "lbg559zsq" "tpj226ohq" "jdo941odr" "pyl665lro" "hoi547oxb" "tke599mge" "tqm797yrt" "dlm480ido" "jlt529gio" "dtl751rtz" "lpi310zks" "rit617cpr" "qdf999kec" "lkz260ohj" "xlg106fuk" "dqj592rbs" "rza409lss" "phx280fll" "rft924rac" "xrt327nir" "mil320zdh" "sec951fzz" "hng963son" "bhm360nws" "whv768vre" "sub738cgn" "udp152qpy" "bfv499vpg" "bef375dxu" "sne299abt" "jwg218naf" "kul046lji" "opm274fep" "xqb135wrk" "vug239ccx" "yvk063bnl" "cca701lfg" "upy690bri" "nsj806ovt" "igt413wky" "ftw622pra" "jsm813cre" "fnd378khc" "utk011unn" "hkm488zlv" "naw752kdp" "gze062nrv" "ytt910gzi" "eeq942uez" "rbm719yzv" "adu204kgv" "voo553bzq" "qah335lvg" "oky453mna" "bye070dci" "uwt849qig" "nkg662cbj" "koy546cve" "fgp548fhm" "hxm087okh" "atb056yvr" "jxz680bdn" "ofc383clx" "ran801jgt" "dai951aut" "muc372eji" "dmv843wdj" "mwl251acq" "skn266edb" "stz033eih" "qbm300sjp" "tax196nfk" "uix079eqf" "evl716cui" "tjl236dov" "mod149kqp" "cai814mxb" "yyf245cfk" "occ503uit" "csd182gul" "jgs728fmy" "hga698aqi" "hfk752ize" "vra872olq" "bjm266zaq" "zva674kji") _$ (foo1 mylist) ("aca823vdk" "adu204kgv" "atb056yvr" "bef375dxu" "bfv499vpg" "bhm360nws" "bjh526uzd" "bjm266zaq" "bye070dci" "byo547swd" "cai814mxb" "cca701lfg" "csd182gul" "dai951aut" "dlm480ido" "dmv843wdj" "dqj592rbs" "dtl751rtz" "eeq942uez" "evl716cui" "fgp548fhm" "fnd378khc" "ftw622pra" "gad189ena" "gze062nrv" "hfk752ize" "hga698aqi" "hkm488zlv" "hng963son" "hoi547oxb" "hxm087okh" "igt413wky" "jdo941odr" "jgs728fmy" "jlt529gio" "jsm813cre" "jwg218naf" "jxz680bdn" "koy546cve" "kul046lji" "laa124lqe" "lbg559zsq" "lkz260ohj" "lpi310zks" "lte537pir" "mil320zdh" "mod149kqp" "muc372eji" "mwl251acq" "naw752kdp" "niq983ocu" "nkg662cbj" "nsj806ovt" "occ503uit" "ofc383clx" "oky453mna" "opm274fep" "opt105nif" "phi902niq" "phx280fll" "pjd997nvz" "pyl665lro" "qah335lvg" "qbm300sjp" "qdf999kec" "qqv937rwf" "ran801jgt" "rbm719yzv" "rft924rac" "rit617cpr" "rji359jxn" "rza409lss" "sec951fzz" "skn266edb" "sne299abt" "stz033eih" "sub738cgn" "tax196nfk" "tjl236dov" "tke599mge" "tpj226ohq" "tqm797yrt" "tug083pja" "udp152qpy" "uix079eqf" "upy690bri" "utk011unn" "uwt849qig" "voo553bzq" "vra872olq" "vug239ccx" "whv768vre" "wtq568rur" "xlg106fuk" "xqb135wrk" "xrt327nir" "ytt910gzi" "yvk063bnl" "yyf245cfk" "zva674kji") _$ (foo2 mylist) ("aca823vdk" "adu204kgv" "atb056yvr" "bef375dxu" "bfv499vpg" "bhm360nws" "bjh526uzd" "bjm266zaq" "bye070dci" "byo547swd" "cai814mxb" "cca701lfg" "csd182gul" "dai951aut" "dlm480ido" "dmv843wdj" "dqj592rbs" "dtl751rtz" "eeq942uez" "evl716cui" "fgp548fhm" "fnd378khc" "ftw622pra" "gad189ena" "gze062nrv" "hfk752ize" "hga698aqi" "hkm488zlv" "hng963son" "hoi547oxb" "hxm087okh" "igt413wky" "jdo941odr" "jgs728fmy" "jlt529gio" "jsm813cre" "jwg218naf" "jxz680bdn" "koy546cve" "kul046lji" "laa124lqe" "lbg559zsq" "lkz260ohj" "lpi310zks" "lte537pir" "mil320zdh" "mod149kqp" "muc372eji" "mwl251acq" "naw752kdp" "niq983ocu" "nkg662cbj" "nsj806ovt" "occ503uit" "ofc383clx" "oky453mna" "opm274fep" "opt105nif" "phi902niq" "phx280fll" "pjd997nvz" "pyl665lro" "qah335lvg" "qbm300sjp" "qdf999kec" "qqv937rwf" "ran801jgt" "rbm719yzv" "rft924rac" "rit617cpr" "rji359jxn" "rza409lss" "sec951fzz" "skn266edb" "sne299abt" "stz033eih" "sub738cgn" "tax196nfk" "tjl236dov" "tke599mge" "tpj226ohq" "tqm797yrt" "tug083pja" "udp152qpy" "uix079eqf" "upy690bri" "utk011unn" "uwt849qig" "voo553bzq" "vra872olq" "vug239ccx" "whv768vre" "wtq568rur" "xlg106fuk" "xqb135wrk" "xrt327nir" "ytt910gzi" "yvk063bnl" "yyf245cfk" "zva674kji") _$ (equal (foo1 mylist) (foo2 mylist)) T _$ (benchmark '((foo1 mylist) (foo2 mylist))) Benchmarking ..........Elapsed milliseconds / relative speed for 128 iteration(s): (FOO2 MYLIST).....1953 / 4.84 <fastest> (FOO1 MYLIST).....9453 / 1.00 <slowest>
    5 points
  3. Where I see posts dug up from many years ago - particularly if there are several answers years later from the same accout - I am starting to assume there is some 'computer aided searching' going on.. not saying a AI bot explicitly but.....
    3 points
  4. Stating the obvious: just consider that creating xrecords & dictionaries is modifying the drawing database and the data is stored in the drawing, whereas LISP data is obviously transient.
    3 points
  5. If you're worried about the removal of duplicated elements when using (vl-sort), just use (vl-sort-i) to obtain the sorted indices and use them to order the original list - this has been solved/demonstrated many times over and is also typically far more performant when sorting lists for which the sort function would otherwise perform some manipulation of the list elements. _$ (setq mylist '(5 3 6 4 5 3 7 5)) (5 3 6 4 5 3 7 5) _$ (vl-sort mylist '<) (3 4 5 6 7) _$ (mapcar '(lambda ( n ) (nth n mylist)) (vl-sort-i mylist '<)) (3 3 4 5 5 5 6 7)
    3 points
  6. Am sure that is new from when I was recording macros - might be time to revisit action recorder then
    2 points
  7. @Dadgad "30 or 40 drawings open at the same time" here is a freebie for you. It will display the dwg names for you pick which one to Goto. Multi radio buttons.lspListbox-AH.lsp Gotodwg.lsp
    2 points
  8. Action Recorder lead me to LISPs, I was annoyed with having to re-record each time I didn't quit get it right and couldn't edit the recording. Good tool though
    2 points
  9. Does anybody else use the ACTION RECORDER? It may well be, the most underappreciated functionality in AutoCad. As one who does not write Lisp, I find it quite intuitive, and incredibly helpful "on the fly". Essentially a Key Stroke Recorder, I use it all the time, and it saves me hours on a busy day, with highly repetitive tasks which need to be run on many hundreds of drawings in succession. Another great 3D Modeling command is PRESSPULL, it is much more powerful, quicker and more useful than EXTRUDE. I first learned about it in this video tutorial https://www.cadtutor.net/tutorials/autocad/extrude-and-press-pull/ . 3D Align is another great command, for when things go all off axis, and need to be realigned.
    2 points
  10. Yes, they have already been warned twice about this.
    2 points
  11. @AONE_LED you do realize those are decade old posts you are answering to?
    2 points
  12. Welcome aboard Tommy there are a few people here who can help you. My questions, where are you in the world ? What discipline are you in, helps to get people with similar skils. Sent you a PM.
    2 points
  13. Hopefully there are dimensions noted on the scan. That's what I would typically use to manually redraw it accurately in CAD from scratch.
    2 points
  14. I thought I would have some more fun with this problem. As I posted earlier, I think AutoCAD's parametric features offer a good solution. Here's an easier construct. Open the attached file and go to the Parametric tab and click Show All or enter the command DCDISPLAY and select the box to see the dimensional constraints. Change the value of dimension d3 to see the box in a different position agaist the wall. The following VLISP program creates a box of user specified dimensions and animates it position and orientation as it slides along the floow and wall. 0,0 is assumed to be the lower corner of the wall. box_animation.mp4 ;Creates an animation of a rectangle slding along a floor ; as it rotates leaning agains a wall. ; 11/13/2026 (defun c:boxanimate (/ ang boxL boxW dAngle dAngleR p i d vlaObj nSteps dx) (vl-load-com) (setq boxL (getreal "\nEnter box length (9): ")) (if (not boxL) (setq boxL 9) ) (setq boxw (getreal "\nEnter box width (2) ")) (if (not boxW) (setq boxW 2) ) (setq dAngle 1 ; rotation angle increment ang dAngle ; total rotation dAngleR (/ (* pi dAngle) 180.) p (list (- boxL) 0) ; poit of rotation i 0 d 100 ; delay value ) (command "_rectangle" "_non" p "_non" (list 0 boxW)) (setq vlaObj (vlax-ename->vla-object (entlast))) (setq nSteps (/ 90 dAngle)) (setvar "CMDECHO" 0) (while (< i nsteps) (setq angR (/ (* pi ang) 180.)) (setq dx (abs (+ (car p) (* boxL (cos angR))))) (vla-Rotate vlaObj (vlax-3d-point p) dAngleR) (vla-Move vlaObj (vlax-3d-point '(0.0 0.0 0.0)) (vlax-3d-point (list dx 0.0 0.0)) ) (setq ang (+ ang dAngle) p (mapcar '+ p (list dx 0)) ) (vla-update (vlax-get-acad-object)) (command-s "_.REGEN") (command "_.DELAY" 100) (setq i (1+ i)) ) (setvar "CMDECHO" 1) (princ) ) ; end defun box fit.02.dwg
    2 points
  15. Dictionary is an object in the drawing file. (setq mainDict (namedobjdict)) (dictadd mainDict "PART001" ;this is they unique key (entmakex '((0 . "XRECORD") ;needed (100 . "AcDbXrecord") ;needed (1 . "Steel") (2 . "Description") (3 . "12.5") (4 . "24") (5 . "100") (6 . "Black") ) ) ) (setq color (cdr (assoc 6 (dictsearch Maindict "PART001")))) So the main "list" or Dictionary is mainDict you then need a key to store the sub list under "PART001" and then as many dotted pairs as you want. dictsearch would be alot faster than assoc with 20,000 list.
    2 points
  16. To select multiple objects, use **`ssget`** instead of `entsel`, and then apply `setpropertyvalue` to each selected object in a loop. Select several objects using a frame, or one at a time. For all selected objects, the **Annotative** property will change to **No**. The filter allows you to select: `TEXT`, `MTEXT', `DIMENSION`, `MULTILEADER` **Objects are not deleted or recreated.** Only the `Annotative` property is changed. ; "Annotative" 0 /No/ (defun c:NoAnno (/ ss i) ; AI ;; (if (setq ss (ssget '((0 . "TEXT,MTEXT,DIMENSION,MULTILEADER")))) (if (setq ss (ssget "_:L" '((0 . "TEXT,MTEXT,DIMENSION,MULTILEADER")))) ; remark of Paul Li (progn (setq i 0) (repeat (sslength ss) (setpropertyvalue (ssname ss i) "Annotative" 0) (setq i (1+ i)) ) (princ (strcat "\nProcessed objects: " (itoa i))) ) ) (princ) ) ; "Annotative" 1 /Yes/ (defun c:YesAnno (/ ss i) ; AI ;; (if (setq ss (ssget '((0 . "TEXT,MTEXT,DIMENSION,MULTILEADER")))) (if (setq ss (ssget "_:L" '((0 . "TEXT,MTEXT,DIMENSION,MULTILEADER")))) ; remark of Paul Li (progn (setq i 0) (repeat (sslength ss) (setpropertyvalue (ssname ss i) "Annotative" 1) (setq i (1+ i)) ) (princ (strcat "\nProcessed objects: " (itoa i))) ) ) (princ) ) ;;; Remove/Add Annotative property to objects [No/Yes] (default No) ;;; Supported objects: TEXT, MTEXT, DIMENSION, MULTILEADER (defun c:SetAnno (/ ss i ans val) ;; Prompt the user, default is No (initget "No Yes") (setq ans (getkword "\nRemove/Add Annotative property to objects [No/Yes] <No>: ")) (if (not ans) (setq ans "No")) ; if Enter pressed — use No (setq val (if (= ans "Yes") 1 0)) ; Yes = 1, No = 0 ;; (if (setq ss (ssget '((0 . "TEXT,MTEXT,DIMENSION,MULTILEADER")))) (if (setq ss (ssget "_:L" '((0 . "TEXT,MTEXT,DIMENSION,MULTILEADER")))) ; remark of Paul Li (progn (setq i 0) (repeat (sslength ss) (setpropertyvalue (ssname ss i) "Annotative" val) (setq i (1+ i)) ) (princ (strcat "\nProcessed objects: " (itoa i) " | Annotative = " ans)) ) (princ "\nNo objects selected.") ) (princ) )
    2 points
  17. You can use AutoLISP's setpropertyvalue to change the Annotative property to No without deleting the objects. LISP code=>(setpropertyvalue (car (entsel "\nSelect object: ")) "Annotative" 0) For processing nested objects, you would also need to iterate through the block definitions and apply the same change to their entities. Xrefs cannot be modified this way without editing their source drawings. This is a useful alternative to manually changing each object's Properties palette.
    2 points
  18. I forgot about this. Att2Text.lsp converts attributes in a block to text outside the block, removes the attribute from the block and Att2TxtBlk.lsp converts attributes in a block to text outside the block, leaves the attribute in the block. Att2Text.lsp Att2TxtBlk.lsp
    2 points
  19. I wonder if exporting the Attribute Values to Excel, then back into the new titleblock would be better? @Lee Mac has Update Titleblock Attributes | Lee Mac Programming and @ziele_o2k has... Export Title Blocks to CSV for Lee's Update Title Block - AutoLISP, Visual LISP & DCL - AutoCAD Forums
    2 points
  20. Technically that's an Express Tool, there used to be several other similar LISPs around as well, there might be one that can do as you wish. In the meantime, just type Multiple, when prompted for the command enter MOCORO, it will stay active after you exit.
    2 points
  21. Did something similar for vehicle driveway checking, just a maybe make the box like 2mm smaller than true size and position and rotate, use intersectwith to see if the box and walls touch you will get nil if they dont.touch. Say stop when get points.
    2 points
  22. This was created by Copilot, limited testing. and only sorts on single item. (defun BubblePass (lst / a b) (cond ((or (null lst) (null (cdr lst))) lst) ((> (car lst) (cadr lst)) (cons (cadr lst) (BubblePass (cons (car lst) (cddr lst))))) (t (cons (car lst) (BubblePass (cdr lst)))) ) ) (defun BubbleSort (lst / i) (repeat (length lst) (setq lst (BubblePass lst)) ) lst ) Asked about sort on 1st 2 items in list (defun QSORT2 (lst / pivot) (defun _less (a b) (or (< (car a) (car b)) (and (= (car a) (car b)) (< (cadr a) (cadr b))))) (if (cdr lst) (progn (setq pivot (car lst)) (append (QSORT2 (vl-remove-if-not '(lambda (x) (_less x pivot)) (cdr lst))) (list pivot) (QSORT2 (vl-remove-if-not '(lambda (x) (not (_less x pivot))) (cdr lst))) ) ) lst ) ) Limited testing.
    2 points
  23. Yeah lisp is a little on the background right now , wife has some serious health issues so my attention lies elsewhere at this moment. The 'good' news is I'm running out of work this month so next month I have a lot of spare time. Will do some reading and maybe / probably some lisping too.
    2 points
  24. @Discus84 Your question reminded me of the time my son asked me if I could determine if the couch he was planning to buy would fit in the frieght elevator of his aprtment building. There are several way to solove this problem. 1. Make multiple copies of the red box at different angles and then position them with object snap against the walls and floor. 2. Use the paramteric feature of AutoCAD to create and constrain the wall and the box. The following image shows only the angle contraint of the box. Tangency to the wall and floor is made via a dimensional contraint. Here's the result of changing the box angle. The following shows the dimensional and geometric constraints. Note, d3 constrains the box to be flush with the back wall and d9 with the floor. You can edit the dimensions in the attached file to meet yout requirements. box fit.dwg
    2 points
  25. @PGia there are other ways to sort lists other than inbuilt Vl-sort. You can use a Lisp version of Bubble sort and other sort algorithms. I sort up to 5 items deep in a list and as far as I can tell none are lost. Yes have seen that with some lists using VL-sort. So you can sort on say X & Y. ; sorts on 1st two items (vl-sort lst '(lambda (a b) (cond ((< (car a) (car b))) ((= (car a) (car b)) (< (cadr a) (cadr b))) ) ) )
    2 points
  26. sure : (alert "Press ok to start your 30hr day") anything else I can do for you?
    2 points
  27. AutoCAD session, you need to use vl-bb-set vl-bb-ref right?
    2 points
  28. I get that @PGia but it almost be harder to recall the correct random variable. associated list might not be what you need with the large data set your working with. as assoc looks at all 20000 records every time. look into Dictionary before going the other route. alot faster searching because you can only have unique keys tho that might be a deal breaker for you.
    2 points
  29. There may be ways to speed up using a list of 20,000 points, the first is if your points are numbered then make the list that way you have to but pt number 0 as 1st item then a (nth x lst) is a simple task and does not need the (- x 1). Re find a point depending how the list is made there is a way of quickly finding the point based on a sorted list a 10,000 list takes 13 tries to find the correct answer, it uses a 1/2 algorithm, look at 5000 item is it before or after look at say 2500 is it before or after so very fast. Can you explain what it is your doing and maybe some people here can provide faster code. I know something I did took 34 minutes 1st go, it now takes 2 minutes including user input.
    2 points
  30. @PGia While it's very possible to create variables on the fly. I agree with Lee that it should not be a method to use, especially in the way you are wanting to use it. That being said, I wrote the following many years ago, but hardly have ever used it for anything. It accepts an assoc. list of strings representing variables and the corresponding values, then creates a variable for each with the value. The core of it is very simple (set (read "StrVar") value) ;|============================================================================== Function Name: (pjk-dynsetvar) Arguments: assoclst = List of cons; an assoc list on the format: (list (cons "<var name1>" <value1>) ... (cons "<Var namN>" <valueN>)) Usage: (pjk-dynsetvar <Assoc. List>) Ex: (pjk-dynsetvar (list (cons "Cenpt" (list 1.0 1.0 0.0)) (cons "Radius" 0.25))) Returns: The results of the read list. You can verify the variables with the ! prefix: Command line Example: Command: (pjk-dynsetvar (list (cons "Cenpt" (list 1.0 1.0 0.0)) (cons "Radius" 0.25))) ((1.0 1.0 0.0) 0.25) Command: !Cenpt (1.0 1.0 0.0) Command: !Radius 0.25 Description: This function dynamically sets AutoLISP variables based on an association list of strings and values. The string keys represent the names of the variables that the values will be assigned to. ================================================================================|; (defun pjk-DynSetVar (assoclst) (mapcar (function (lambda (x)(set (read (car x)) (cdr x)))) assoclst) ) ;; End Function (pjk-dynsetvar)
    2 points
  31. It seems it's not placing CENTERMARKS in Mechanical, I haven't tested other verticals from the toolset, it does use my fallback CrossHairs, though. I may not bother getting CENTERMARK to work in verticals unless someone else is interested, I would use the LISP in AutoCAD anyway, but I will do some testing on Mechanical/Architectural drawings in AutoCAD when I have time. Speaking of time, does anyone have a LISP or something that can give me a 30+ hour day, maybe @rlx I'll try to check this latest version in AutoCAD 2000i this weekend.
    2 points
  32. @Steven P A couple of suggestions (defun MakeDriveList ( / replace with (if (not AH:Butts)(load "Multi radio buttons.lsp")) ; loads the program if not loaded already (setq drivelist (ah:butts 1 "V" '("Please choose" "C:" "D:" "E:" "F:"))) "(setq GetFolderDcl (load_dialog "GetFolder"))" I use the write dcl to lisp by RLX so dcl code can live in the master lisp, then only one file. You may be able to use powershell to dump out the correct drives including network drives to a file and read that with lisp, done via a (startapp c:\path\drives.bat) powershell Get-PSDrive -PSProvider FileSystem | Out-File -FilePath "D:\acadtemp\drives_list.txt" exit Convert dcl 2 lisp rlx.lsp Multi radio buttons.lsp
    2 points
  33. and yet here's another version that should run in LT pl_GetDir.lsp
    2 points
  34. I work with 2D CAD drawings for protective foam packaging and CNC, so overlapping geometry is something I pay attention to. Duplicate lines can create problems downstream, especially when preparing closed profiles for cutting. I think it's worth teaching beginners to check their geometry early instead of waiting until export.
    2 points
  35. When starting a new drawing, it can be tempting to keep most objects on one layer and separate them later. I've found that creating a basic layer structure from the beginning makes editing and managing drawings much easier. I usually separate walls, doors, windows, dimensions, text, and construction lines into individual layers, with appropriate colours and line types. For someone learning CAD, what layer structure would you recommend? Do you follow a standard naming convention, or create layers based on the requirements of each project?
    1 point
  36. Having an effective group of Layers is a must especially when it comes to the Floor Plan in the AEC world. Unlike Sections, Elevations, Details and other drawing types, the Floor Plan is typically drawn to communicate one or more of the following purposes: Construction, Demolition, Reflected Ceiling, Furniture and Equipment layouts. So it will be to the drafter's advantage to have a group of common Layers that can serve all of the above purposes such as Full Height Walls, Windows, overall Dimensions, Room Labels and etc. Then you'll need to have specific group of Layers that are only left on to satisfy the other purposes such as Fixtures, Furnitures, Specific Dimensions and Texts. As for the Layer naming convention, the most effective seems to have a system where Layers can be easily separated by discipline such as beginning the Layer Name as you've shown with one of the following Letters: A = Architecture, C = Civil, E = Electrical, G = Graphics, I = Interiors, L = Landscape, M = Mechanical, P = Plumbing, S = Structural What follows after is up for grabs. Some like to work with four letter groupings such as: Cols, Dims, Door, Glaz, Text, Wall while others like myself prefer to go with three letter grouping such as: Col, Dim, Dor, Glz, Txt, Wal separating each group with a hyphen or underscore. These Layer Names I would typically have stored in drawing templates for different Building Types. This way when I start a project I would choose the proper building type so I can begin with a set of Layers that have been tried and true.
    1 point
  37. All of this is automatically put on a users layer names, so can be one layer for all or objects are drawn on predefined layers. i won't go into but there is a master file with user layer names in it. You draw objects via a menu not lines. So rather than just concentrate on setting correct layer use a menu system to draft by subject and draft on correct layer. Most 3rd party software has an inbuilt layer system inside their code.
    1 point
  38. update v16: fix error order plot 7 pline https://drive.google.com/file/d/1m3x5uHPSI4jGTMEf0g7v4Iwg1pLF6rrz/view?usp=sharing
    1 point
  39. I am not sure I would trust a link from a new members single comment 8 years after the original question. Others might trust it. Just jumps out as 'Bot'
    1 point
  40. Those are the ones that always bug me too. I frequently use the DIMSPACE command to force some of those unruly floaters to reorient closer to the dimline. Really annoying wasting time grip dragging dims around to get them exactly as desired! Happy Thanksgiving Day everybody.
    1 point
  41. As I clean up a drawing I like to use DIMEDIT, mostly the Home option to clean them up. I am thinking of trying to figure out a foolproof method to automate that with my other clean-up tools, though some dimensions don't act the way I want, particularly dimensions for small measurements that are forced outside the extension lines or if they have a leader line. Manual is probably fast enough for now though.
    1 point
  42. In simple terms two ways to do it a field in the block text or just read the layer and write that into the attribute. Using the field option has the advantage of if you change the hatch layer the attribute updates. the disadvantage is that you can not save the ID of the object in a Block it has to be updated each time you say make the Mleader. Yes can be done. Maybe later today will do something, limited time at moment.
    1 point
  43. import traceback import wx from pyrx import Ap class TestUIDialog(wx.Dialog): def __init__(self, parent=None): style = wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER super().__init__( parent, title="PyRx wxPython Control Check", size=(340, 240), style=style, name="PyRxTestUIDialog", ) # Create a panel, a sizer and some controls panel = wx.Panel(self) sizer = wx.BoxSizer(wx.VERTICAL) self.cb = wx.CheckBox(panel, label="Modern Visual Styles Active") self.cb.SetValue(True) self.combo = wx.ComboBox( panel, choices=["Option A", "Option B"], value="Option A", style=wx.CB_READONLY, ) # Bind to an event self.combo.Bind(wx.EVT_COMBOBOX, self.on_combo_select) self.gauge = wx.Gauge(panel, range=100) self.gauge.SetValue(70) self.txt = wx.TextCtrl(panel, value="Text input test") self.btn = wx.Button(panel, wx.ID_OK, label="Close Test") # add the controls to the sizer for ctrl in (self.cb, self.combo, self.gauge, self.txt, self.btn): sizer.Add(ctrl, 0, wx.ALL | wx.EXPAND, 8) # add the sizer to the panel panel.SetSizer(sizer) def on_combo_select(self, event): print("Selected:", self.combo.GetValue()) event.Skip() @Ap.Command() def testui(): try: with TestUIDialog() as dlg: res = Ap.Application.showModalDialog(dlg) print(res) except Exception as err: traceback.print_exception(err)
    1 point
  44. Hire a casual, student, some one wanting experience drafting, raster to vector can be a hit or miss. Use Ortho a lot when tracing over, and like others read the dims, using ortho start point, drag then type dim value. A secret underlay is a pdf.
    1 point
  45. My comments "Decades-old municipal or plant drawings ", yes that is where the water main is located according to the onsite meeting with the water authority representative, We then got a service locator to really confirm where is water main. It took a meandering path due to road conditions not a straight line as shown on the water plan. So the plans are only asgood as "Ist baout here somewhere. Another telecommunication authority its a line on a plan no idea of actual offsets etc, conduits do not go square out of pits rather run along a boundary then cross a road so many stories about services, a 22,000KV elec underground cable missed by 100mm because another crew took on doing some trenching, we had already dug and deptrhe id. For us a day to day task. Just have to work out how to solve. Solution may need a current field survey tying known points to world co-ordinates etc.
    1 point
  46. Raster images - Tiffs - complete redraw using whatever dimensions are available, what I don't know you can infer a lot (for example a wall thickness near a known dimension can infer another dimension) and after that it is down to experience and knowledge with the odd "go over there with a tape measure". Mapping websites are OK for buildings - use 2 or 3 and average out the distances can help if there are absolutely no known dimensions (again inferring distances from known things... including counting bricks from a street view), mapping I have a tool to draw perpendicular polylines off the first line angle which helps a lot. Small parts are often drawn to fractions of the scale (0.5mm, 1mm, 2.5mm etc.... 1/100th inch or whatever) - so once drawn can snap entities to a grid... gets close enough which is all you can do if you cannot be supplied with dimension or a part / site visit to work more accurately from Used to have Paintshop Pro (7 I think) that had a tool to correct parallax errors somewhat.
    1 point
  47. @Discus84 I have found that when creating geometry to be used with the parametric feature it is best not to create any lines or polylines orthogonal to the world. E.g., Create you box somewhat rotated and then it's clearer what constraints you need, both dimensional and geometric constraints.
    1 point
  48. @BIGAL About the pop menus: Interesting, I'll have a look. One thing I left out from my last comment is that I add most of my lisps to the ribbon as buttons so I don't need to remember or type the command. @VicoWang I don't use the excel file to run anything, It is just a table to keep track of my lisps. About me using bricscad and can't use .vlx: There are also .brx files In some forums that I avoid. I'll be a little more blunt: I will use compiled file from a known trusted vendor. This is not the case here. In public forums I'll stay with open source, Both for the reason I've mentioned earlier and the one above here.
    1 point
  49. @Dadgad Actually I even went as far as creating a lisp command so I can make the selections to dwgunits within a dcl gui instead of looking at the dull command line interface. https://marketplace.autodesk.com/apps/5190d5ec-0b6a-4b70-b089-2753abcb8e3a?priceId=bfbb3227-aa55-4923-b9e6-7fe3db0a0a5b
    1 point
  50. Try this for breakages: ; Self-Intersection Test by Lee McDonnell ~ 19.12.09 (defun SelfInt (obj / vlax-list->3D-point obj) (vl-load-com) (defun vlax-list->3D-point (lst) (if lst (cons (list (car lst) (cadr lst) (caddr lst)) (vlax-list->3D-point (cdddr lst))))) (or (eq 'VLA-OBJECT (type obj)) (setq obj (vlax-ename->vla-object obj))) (vlax-list->3D-point (vlax-invoke obj 'IntersectWith obj acExtendNone))) (defun c:test (/ *error* vl ov ent obj uflag doc) (vl-load-com) (defun *error* (msg) (and ov (mapcar (function setvar) vl ov)) (and uflag (vla-EndUndomark doc)) (or (wcmatch (strcase msg) "*BREAK,*CANCEL*,*EXIT*") (princ (strcat "\n** Error: " msg " **"))) (princ)) (setq vl '("CMDECHO" "OSMODE") ov (mapcar (function getvar) vl)) (mapcar (function setvar) vl '(0 0)) (while (progn (setq ent (car (entsel "\nSelect Object: "))) (cond ( (eq 'ENAME (type ent)) (if (not (vlax-method-applicable-p (setq obj (vlax-ename->vla-object ent)) 'IntersectWith)) (princ "\n** Invalid Selection **") (progn (setq uflag (not (vla-StartUndomark (setq doc (vla-get-ActiveDocument (vlax-get-acad-object)))))) (defun BrkSelf (ent) (foreach x (SelfInt ent) (vl-cmdf "_.break" (list ent x) "_F" x x) (BrkSelf (entlast)))) (BrkSelf ent) (setq uflag (vla-EndUndoMark doc)))))))) (mapcar (function setvar) vl ov) (princ))
    1 point
×
×
  • Create New...