Jump to content

Search the Community

Showing results for tags 'list'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • CADTutor
    • News, Announcements & FAQ
    • Feedback
  • AutoCAD
    • AutoCAD Beginners' Area
    • AutoCAD 2D Drafting, Object Properties & Interface
    • AutoCAD Drawing Management & Output
    • AutoCAD 3D Modelling & Rendering
    • AutoCAD Vertical Products
    • AutoCAD LT
    • CAD Management
    • AutoCAD Bugs, Error Messages & Quirks
    • AutoCAD General
    • AutoCAD Blogs
  • AutoCAD Customization
    • The CUI, Hatches, Linetypes, Scripts & Macros
    • AutoLISP, Visual LISP & DCL
    • .NET, ObjectARX & VBA
    • Application Beta Testing
    • Application Archive
  • Other Autodesk Products
    • Autodesk 3ds Max
    • Autodesk Revit
    • Autodesk Inventor
    • Autodesk Software General
  • Other CAD Products
    • BricsCAD
    • SketchUp
    • Rhino
    • SolidWorks
    • MicroStation
    • Design Software
    • Catch All
  • Resources
    • Tutorials & Tips'n'Tricks
    • AutoCAD Museum
    • Blocks, Images, Models & Materials
    • Useful Links
  • Community
    • Introduce Yourself
    • Showcase
    • Work In Progress
    • Jobs & Training
    • Chat
    • Competitions

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Found 33 results

  1. How can I arrange list of point coordinates(x y ) ascending to X or Y
  2. I have a 'while' loop that adds what was entered in the command line to a list each time it loops. Then I would like to get the sum of all the numbers in the list. I am pretty confident that this should work: (setq CLength1 (apply '+ (list lst))) But I get this error on the command line: ; error: bad argument type: numberp: (36 36 36 36) Full 'while' code: (while (progn (initget "U") (setq d (getdist (strcat "\Distance to next Vert Strap (Enter when done; U to Undo)")))) (setq lst (cons (fix d) lst)) (cond ((= d "U") (command "._undo" "._back")) ((/= d 0) (progn (command "._offset" (/ d 12.) s "_non" (polar (cdr (assoc 10 (entget s))) 0. 1.) "" ) (if (not (eq s (setq s (entlast)))) (progn (setq p1 (cdr (assoc 10 (entget s))) p2 (cdr (assoc 11 (entget s))) pt (if (< (cadr p1) (cadr p2)) p1 p2 ) ) (setq dx1 (car p1) ;ent x value dx2 (cadr p1) ;ent y value dx3 (caddr p1) ;ent z value dd1 (+ dx1 (/ d 12)) ;dimension distance sdx (- dx1 (/ d 12)) ;start point x dmx (/ (+ dd1 dx1) 2) ;middle ) (if (>= d 18) (setq doff -1.6) (setq doff -3.2) ) (entmake (list (cons 0 "DIMENSION") (cons 100 "AcDbEntity") (cons 67 0) (cons 8 "DIMBAD") (cons 100 "AcDbDimension") (cons 10 (trans (list dd1 doff 0.) 1 0)) (cons 11 (trans (list dmx doff 0.) 1 0)) (cons 12 (list 0. 0. 0.)) (cons 70 33) (cons 1 "") (cons 71 5) (cons 72 1) (cons 41 1.0) (cons 52 0) (cons 53 0) (cons 54 0) (cons 3 "TEMPLATE_DRAWING") (cons 100 "AcDbAlignedDimension") (cons 13 (trans (list sdx 0. 0.) 1 0)) (cons 14 (trans (list dx1 0. 0.) 1 0)) (cons 15 (list 0. 0. 0.)) (cons 16 (list 0. 0. 0.)) )) ) ) ) ))) (setq CLength1 (apply '+ (list lst))) (princ CLength1)
  3. benhubel

    Reverse Numbers

    I regularly use text to number objects for designating cut order. In the past, I have cobbled together some code that can quickly increment or decrement all selected numerical text in case I make a mistake and/or have to change something. This works marvelously, but often, I find that I need to go beyond that and completely reverse the order. Using this code as a starting point, I thought this would be super simple but the fact that I'm trying to do list manipulation to text objects is completely throwing me off. I'm still a bit new to this sort of thing. I was thinking I'd get a list of all selected text, sort it, then reverse that list before applying changes to the text. Highest number gets swapped with the lowest, second highest with second lowest, etc. ("1" "2") would become ("2" "1") ("2" "1" "4" "5" "3") would become ("4" "5" "2" "1" "3") ("2" "8" "17" "4") would become ("17" "4" "2" "8") ("3" "5" "-4") would become ("3" "-4" "5") I'm not sure where to start, nor what process to use. My main problem is that I can't figure out how to sort and edit the data without losing links to the correct text objects. Any help would be awesome. Here is the my quick increment/decrement routine that I'm trying to start with. ;Quick Increment/decrement ;Increments/decrements all selected text integers by 1 ;I hacked this code together with help from an "increment in range" routine. ;Original code can be found here https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/incriment-numbered-text/td-p/3614646?nobounce ;Quick Increment (defun C:qi (/ textselection textobject old) (vl-load-com) (setq textselection (ssget '((0 . "TEXT")))) (repeat (sslength textselection) (setq textobject (vlax-ename->vla-object (ssname textselection 0)) old (vla-get-TextString textobject); initial text content ); setq (if (and (= (strlen old) (strlen (itoa (atoi old)))); text represents integer ; Blocks e.g. "12A", "4.5", "C37", and completely non-numerical ; text [except for next test], but allows negative integers. ; Also disallows e.g. "06", "008", so if those should be included... (if (= (strlen old) 1) (wcmatch old "#") T) ; blocks single non-numerical character e.g. "A" [passes prior test] ); and (vla-put-TextString textobject (itoa (+ (atoi old) 1))); replace ); if (ssdel (ssname textselection 0) textselection) ); repeat (princ) (setq sel1 (ssget "P")) (sssetfirst nil sel1) ); defun ;Quick decrement (defun C:qd (/ textselection textobject old) (vl-load-com) (setq textselection (ssget '((0 . "TEXT")))) (repeat (sslength textselection) (setq textobject (vlax-ename->vla-object (ssname textselection 0)) old (vla-get-TextString textobject); initial text content ); setq (if (and (= (strlen old) (strlen (itoa (atoi old)))); text represents integer ; Blocks e.g. "12A", "4.5", "C37", and completely non-numerical ; text [except for next test], but allows negative integers. ; Also disallows e.g. "06", "008", so if those should be included... (if (= (strlen old) 1) (wcmatch old "#") T) ; blocks single non-numerical character e.g. "A" [passes prior test] ); and (vla-put-TextString textobject (itoa (- (atoi old) 1))); replace ); if (ssdel (ssname textselection 0) textselection) ); repeat (princ) (setq sel1 (ssget "P")) (sssetfirst nil sel1) ); defun
  4. Hello kind Lispers, I am wondering if someone can point me in the right direction. I have a 3D Primitive Shape, many of them actually. Picture a concrete building floor with slopes, and drain trenches. none of the shapes are simple rectangles. I see that the AutoCAD command: list will produce the following. Command: list Select objects: 1 found Select objects: Ks_VolBody Layer: "0" Space: Model space Handle = 1bc Coordinates of Object Entity Coordinate System Origin X= 122.2666 Y= 66.7545 Z= 0.0000 Xaxis X= 1.0000 Y= 0.0000 Z= 0.0000 Yaxis X= 0.0000 Y= 0.0000 Z= 1.0000 VersionIndex = 0 PartOrigin =-1 Area =128102.870250 Volume =2752941.011569 Center of Weight X=276.671661 Y=186.828356 Z=50.368505 (Sorry i know that code wrapper is meant for..well.. code. but it looks better this way) OK the point is. The volume that the list command produces is correct. I want this Volume, and I want to be able to simply prompt the user of my LISP to pick a shape and then store this volume in a variable. The problem I am having is that I can not seem to find where to access this Volume. Any help would be appreciated Cheers! Andy.
  5. When you select some points and type list, AutoCad brings a list of some data such as point coordinate and layer name or color etc. On the other hand if you have a large number of points you need to press enter and go to next page. One year ago I saw a lisp routine which could list all point coordinates in list window without any further unnecessary data, so you could copy and paste all your selected point coordinates to a text file or excel at once. Now I have lost that great lisp. That was something like this pic (this has created by Photoshop) If anyone have it please give it to me or please write a lisp like this for me again. Any help would be greatly appreciated.
  6. I've spent some time writing up the following tutorial which aims to demonstrate how to construct a simple block counter and in the process give the user an introduction to association lists and dotted pairs: Building Association Lists: A Simple Block Counter The tutorial is a step-by-step walkthrough of the process of creating the block counter, with diversions here and there to explain the various concepts used by the program. Throughout the tutorial I've also tried to explain why every part of the code is used in the way that it is, rather than providing the reader with a block of code and leaving some parts without an explanation (for example, why the program should include (princ) or (prin1) as the last expression etc.). I welcome your feedback on the tutorial - Is it too simplified? Is it too long? Too boring? All of the above? Feel free to also point out any typos, as these can be difficult to spot when proof-reading your own work. Thanks, Lee
  7. I know how to do this and have done it. BUT. I have multiple products.ini, products2.ini files where i get the values for popup_list. The first selected is ok. However when i change to the external ini file to the next ini file. The content of the popup_list is still the one i have used at first. I cant post the whole lisp nor DCL but has someone experienced this before and how can i "flush" the old external ini values? Thanks.
  8. I'm trying to make a block with an item list where I can choose any or all of 10 line items, I can put a stretch and array to size up the list to exclude blank lines but I cannot figure out which method to use to make a checklist. Layers are not an option because our clients have certain layer lists. Visibility seems to just do 'This OR That', not 'This, This AND That'. I think a LookUp Table is the key but I don't know which parameter sets to start with and how to make this checklist work. Attributes are not really the answer because the line items have 9 columns of info that never change on each item line. They must stay in the same order too. If there was some way to turn off sub-blocks, and drag them up or down! Thanks for any ideas!
  9. Drawing List Report only brings up sheet numbers. I've just started using electrical and have had to hit the ground running with it, everything has been going fine until I try to edit the index created by drawing list report. I am in Glasgow working on one server, and I send complete work over to Belfast which they copy onto their server. The most annoying thing is that i only want to pull 'sheet number' and 'description' info for a table that would take me seconds to edit manually. Problem:- when I run a report it only lifts sheet numbers, (allegedly when i tranfer the files over to the belfast server they tell me it works first time). I have tried experimenting with other project files to the same end... the default DWGDESC field never lifts any info (i do change its name). I am new to this but my spider senses are tingling and i think maybe I am missing access to a file that they have stored on their server. Does anyone recognise this problem? I hope its glaringly obvious... help me obi wan... your my only hope...
  10. Hi, I have a list of Xrefs Xref_1 Xref_2 Xref_3_ELC Xref_4_ELC Xref_........ I want to modify the list to only include items that have_ELC at the end. even better would be if i could only add Xrefs to my list that have _ELC at the end. both attempts below do not succeed. any ideas? (defun c:findxref (/ td xrf) (setq XrfM nil) (while (setq td (tblnext "BLOCK" (not td))) (and (= (logand (cdr (assoc 70 td)) 4) 4) (setq xrf (cons (strcase (cdr (assoc 2 td))) xrf)) ) ) (print xrf) ;attempt with Vl-remove (foreach n xrf (if (/= (wcmatch n "*_ELC")T) (vlremove n xrf))) ;Create new list (foreach n xrf (if (= (wcmatch n "*_ELC")T) (append n xrfm))) (print Xrf) (print Xrfm) (princ) ) Thanks
  11. Hey Guys, Its been a awhile since I have done any Autolisp programming and I am stuck... I am using a conditional statement to generate a number i.e. 1.625 and then I want to add that to the Z elevation of a point but it keep erroring out at this line. I have spent about an hour and half looking back thru resources and haven't been able to find the correct syntax. This is the line erroring out: (setq NEWPT1 (APPEND (LIST (CAR USRP1) (CADR USRP1)) (+ (CDDR USRP3) TRAP_Z_OFF))) ; ERRORS OUT HERE Here is the full code. (defun C:droptrap() (command "UNDO" "BEGIN") (initerr) (setvar "lunits" 2) (setvar "luprec" 4) (setvar "attreq" 0) (command "UNDO" "BEGIN") (setq OLDCMD (GETVAR "CMDECHO")) (setvar "CMDECHO" 0) (setq OLDOSMODE (GETVAR "OSMODE")) (setvar "OSMODE" 0) (setq OLDORTHOMODE (GETVAR "ORTHOMODE")) (vl-load-com) (setq thisdrawing (vla-get-activedocument (vlax-get-acad-object))) (initget "1 2 3 4") (setq TRAP_TYPE (getkword "\n Select trapeze type: ([1]:1-5/8x1-5/8, [2]:1-5/8x1-5/8 B2B, [3]1-5/8x13/16, [4]1-5/8x13/16 B2B): ")) (if (or (= TRAP_TYPE "1")(= TRAP_TYPE "3")) (progn (initget "1 2") (setq FACE_DIR (getkword "\n Trapeze opening up or down?: ([1]:UP [2]:Down): ")) ) (setq FACE_DIR "1") ) (cond ((and (= TRAP_TYPE "1")(= FACE_DIR "2")) (setq TRAP_Z_OFF 1.625)) ((and (= TRAP_TYPE "3")(= FACE_DIR "2")) (setq TRAP_Z_OFF 0.8125)) (T (setq TRAP_Z_OFF 0.0)) ) (setq blockname "TRAP-XDATA-T1_1.625") (setq USRP1 (GETPOINT "\n Select center point of rod 1: ")) (setq USRP2 (GETPOINT "\n Select center point of rod 2: ")) (setq USRP3 (getpoint "\n Select elevation of attachment point: ")) (setq NEWPT1 (APPEND (LIST (CAR USRP1) (CADR USRP1)) (+ (CDDR USRP3) TRAP_Z_OFF))) ; ERRORS OUT HERE (setq NEWPT2 (APPEND (LIST (CAR USRP2) (CADR USRP2)) (+ (CDDR USRP3) TRAP_Z_OFF))) ; ERRORS OUT HERE TOO (setq MIDPT (POLAR NEWPT1 (ANGLE NEWPT1 NEWPT2) (* (DISTANCE NEWPT1 NEWPT2) 0.5))) (setvar "ORTHOMODE" 1) (COMMAND "-INSERT" BLOCKNAME MIDPT "1" "1" NEWPT2) (command "rotate3d" (entlast) "" 2 NEWPT1 NEWPT2 90) (setvar "OSMODE" OLDOSMODE) (setvar "CMDECHO" OLDCMD) (setvar "CLAYER" LAYNAME) (COMMAND "UNDO" "END") (PRINC) ) The code is unfinished so I am trying to keep it working as I build it.
  12. Hello guys, Is it possible to create a list in table about my dynamick blocks which is contain the different length, size and view of the blocks? Is it a command to list in table all of the blocks with this attributes? Thank you for your help! T
  13. Say this is my code: (defun c:test() (setq list(getpoint "\nChoose point here") ) When you click on your autocad drawing i know that it stores the coordinates in a x,y,z format in a list.. How can i extract those numbers?
  14. Hello everybody. I need help to sort lists in a code. Use a program created by the great Fixo to create tables containing some attributes. I found that, depending on how the block is built, the end result will be undesired. I took the liberty of attaching the file exemplifying the case. Any help will be appreciated. Luís Augusto. Sort list.dwg ;Oleg Fateev ;16th Jan 2014 06:18 pm (defun C:CLIST (/ acapp acsp adoc atable attdata attitem atts blkname blkobj col en headers pt row sset title ) (txtNotExists) (TablExists) (or adoc (setq adoc (vla-get-activedocument (setq acapp (vlax-get-acad-object))) ) ) (or acsp (setq acsp (vla-get-block (vla-get-activelayout adoc))) ) (if (setq sset (ssget "_:S:E:L" (list (cons 0 "INSERT") (cons 66 1) (cons 410 (getvar "ctab")) ) ) ) (progn (setq en (ssname sset 0)) (setq blkobj (vlax-ename->vla-object en) blkname (vla-get-effectivename blkobj) ) (if (/= blkname "*");any other block different "*" (progn (setq atts (vlax-invoke blkobj 'getattributes)) (foreach attobj atts (if (wcmatch (vla-get-tagstring attobj) "PIN_*");change "PIN_#*" use letters also (progn (setq attitem (cons (vla-get-tagstring attobj) (vla-get-textstring attobj) ) ) (setq attdata (cons attitem attdata)) ) (setq attdata (reverse attdata)) ) ) (setq attdata (mapcar '(lambda (a) (list (vl-string-subst "" "PIN_" (car a)) (cdr a) ) ) attdata ) ) (if (setq pt (getpoint "\nSpecify table location:")) (progn (setvar 'ctablestyle "TB_CONECTORS") (setq atable (vla-addtable acsp (vlax-3d-point pt) (+ 2 (length attdata)) 2 (/ (getvar 'dimtxt) 2) (* (getvar 'dimtxt) 16) ) ) (vla-put-regeneratetablesuppressed atable :vlax-true) (setq col 0) (foreach wid (list 4.5 30.5) (vla-setcolumnwidth atable col wid) (setq col (1+ col)) ) (vla-put-horzcellmargin atable 0.3) (vla-put-vertcellmargin atable 0.3) (vla-setTextheight atable 1 2.0) (vla-setTextheight atable 2 1.4) (vla-setTextheight atable 4 1.4) (setq title blkname) ;(setq title (getstring (strcat "\nTable title: <" blkname ">: "))) (if (eq "" title) (setq title blkname) ) (vla-setText atable 0 0 title) (vla-setcelltextheight atable 0 0 2.0) (vla-SetCellAlignment atable 0 0 acMiddleCenter) (setq headers (list "Pin" "Circuit / Color / Section / Mark") ) (setq row 1 col 0 ) (repeat (length headers) (vla-SetCellAlignment atable row col acMiddleCenter) (vla-setcelltextheight atable row col 1.4) (vla-setText atable row col (car headers)) (setq headers (cdr headers)) (setq col (1+ col)) ) (setq row 2) (foreach record attdata (setq col 0) (foreach item record (vla-setText atable row col item) (if (= 0 col) (vla-SetCellAlignment atable row col acMiddleCenter) (vla-SetCellAlignment atable row col acMiddleLeft) ) (vla-setcelltextheight atable row col 1.4) (setq col (1+ col)) ) (setq row (1+ row)) ) (vla-put-regeneratetablesuppressed atable :vlax-false) (vla-put-height atable (+ (* (vla-get-rows atable) 2.2) 4.1) ) (vla-update atable) ) ) ) ) ) ) (princ) ) (defun txtNotExists () (if (not (tblsearch "style" "ARIAL_2.0")) (progn (entmake (list '(0 . "STYLE") '(100 . "AcDbSymbolTableRecord") '(100 . "AcDbTextStyleTableRecord") '(2 . "ARIAL_2.0") ;<- Your style name here '(70 . 0) '(40 . 2.0) '(41 . 1.0) '(50 . 0.0) '(71 . 0) '(42 . 0.09375) '(3 . "Arial.ttf") '(4 . "")) ) (princ) ) ) ) (defun TablExists () (vl-load-com) (setq stylename "TB_CONECTORS") (setq actdoc (vla-get-activedocument (vlax-get-acad-object))) (setq dict (vla-get-dictionaries actdoc)) (setq tabcol (vla-item dict "acad_tablestyle")) (if (vl-catch-all-error-p (setq tabsty (vl-catch-all-apply 'vla-item (list tabcol stylename)))) (progn (vl-load-com) (MakeTableStyle) ) ) (princ) ) (vl-load-com) (defun MakeTableStyle() ;;http://hyperpics.blogs.com/beyond_the_ui/2012/07/creating-a-table-style-with-autolisp-and-the-activex-api.html ;;By Lee Ambrosius ;; Get the AutoCAD application and current document (setq acad (vlax-get-acad-object)) (setq doc (vla-get-ActiveDocument acad)) ;; Get the Dictionaries collection and the TableStyle dictionary (setq dicts (vla-get-Dictionaries doc)) (setq dictObj (vla-Item dicts "acad_tablestyle")) ;; Create a custom table style (setq key "TB_CONECTORS" class "AcDbTableStyle") (setq custObj (vla-AddObject dictObj key class)) ;; Set the name and description for the style (vla-put-Name custObj "TB_CONECTORS") (vla-put-Description custObj "Tabela de conectores") ;; Sets the bit flag value for the style (vla-put-BitFlags custObj 1) ;; Sets the direction of the table, top to bottom or bottom to top (vla-put-FlowDirection custObj acTableTopToBottom) ;; Sets the supression of the table header (vla-put-HeaderSuppressed custObj :vlax-false) ;; Sets the horizontal margin for the table cells (vla-put-HorzCellMargin custObj 0.3) ;; Sets the supression of the table title (vla-put-TitleSuppressed custObj :vlax-false) ;; Sets the vertical margin for the table cells (vla-put-VertCellMargin custObj 0.3) ;; Set the alignment for the Data, Header, and Title rows (vla-SetAlignment custObj (+ acDataRow acTitleRow) acMiddleLeft) (vla-SetAlignment custObj acHeaderRow acMiddleCenter) ;; Set the text height for the Title, Header and Data rows (vla-SetTextHeight custObj acTitleRow 1.5) (vla-SetTextHeight custObj (+ acDataRow acHeaderRow) 1.0) ;; Set the text height and style for the Title row (vla-SetTextStyle custObj (+ acDataRow acHeaderRow acTitleRow) "ARIAL_2.0") (princ) ) (prompt "\n\t---\tStart command with CLIST\t---\n") (prin1) (or (vl-load-com)) (princ)
  15. TheyCallMeJohn

    Append 3D Points to a List

    I have tried several combination and gone thru about a 100 posts but I can't figure out what I am doing wrong. I am filtering thru objects and pulling out a 3D coordinate from the database. Then I am turning that into a 3 point list (x y z). Then I want to create a list of those points and add to them to the existing list as the program filters thru the remaining objects from the selection set. (progn (setq unitpoint_orig (vl-string-right-trim ";" (substr (vlax-get entvla 'points) 12))) (if (and(or (= Z_pref "Y")(= Z_pref "y"))(/= Z_height nil)) (progn (setq unitpoint_mod (comma_pull unitpoint_orig "REAL_NUM")) (setq unitpoint (list (car unitpoint_mod) (cadr unitpoint_mod) (caddr Z_height))) ) (setq unitpoint (comma_pull unitpoint_orig "REAL_NUM")) ) (setq unitpoint_lst (append unitpoint_lst 'unitpoint)) ;(command "insert" pl_block unitpoint "1" "1" "0") ) Current Result: (105.13 3165.22 0.0 105.13 3194.65 0.0 105.13 3142.5 0.0) Desired Result: ((105.13 3165.22 0.0)(105.13 3194.65 0.0)(105.13 3142.5 0.0)) Once I get this part working, I am then planning on filtering for duplicates using Lee Mac's subroutines. Then inserting based off those points.
  16. Hi guys, When I insert a dynamic block containing text attributes, it brings up a list of questions for me to fill in the information (as normal). For convenience, I would like them to appear in some sort of logical order. Does anyone know how this can be achieved? To rearrange the list?
  17. Maybe I'm just too new at the LISP thing but I've been through many forums and nothing really seems to spell it out for the layman, i.e. me. My company seems rather fresh to LISP as well but they have one "master" list of lisps they have used for some time. This list is loaded in everyone's CAD. I have several others that I have found that I would like to add to this master list but I don't see how they are separated and loaded. The idea is to update this master list with new commands and have others be able to simply have them available the next time CAD is started up again when the original lisp is loaded. Is there a quickie routine that loads other locations? I was given this style of line and told it would do such a thing but I must still be doing something wrong (load "brkblk") (load "BreakObjects18") (load "CCC") (load "Copy2DrawingsV1-2") (load "Copy2LayoutsV1-1") (load "DoubleOffsetV1-1") (load "Dynamic-Offset") (load "MCOPY") (load "QuickDimAligned-QDA") (load "ROT2ENT") (princ (load "BreakObjects18" "\nBreakObjects18.LSP file not loaded..")) (princ (load "CCC" "\nCCC.LSP file not loaded..")) (princ (load "Copy2DrawingsV1-2" "\nCopy2DrawingsV1-2.LSP file not loaded..")) (princ (load "Copy2LayoutsV1-1" "\nCopy2LayoutsV1-1.LSP file not loaded..")) (princ (load "DoubleOffsetV1-1" "\nDoubleOffsetV1-1.LSP file not loaded..")) (princ (load "Dynamic-Offset" "\nDynamic-Offset.LSP file not loaded..")) (princ (load "MCOPY" "\nMCOPY.LSP file not loaded...")) (princ (load "QuickDimAligned-QDA" "\nQuickDimAligned-QDA.LSP file not loaded...")) (princ (load "ROT2ENT" "\nROT2ENT.LSP file not loaded...")) Thanks for the patience, -Nobull
  18. Hello all, I have my sleigh packed and ready to go, the only problem is when I label my reindeer they don't show up as Dasher, Dancer, Prancer, Vixen etc. Their names are all mixed up. I tried an audit, recover and even ran overkill to try to sort this out. Any help would be appreciated, I have to get this done within the next 48 hours. Thanks and Happy Holidays to All!! Phil
  19. nativedog

    list, nlist

    I came across this command in another office they had called nlist that activated the attached screen in Autocad 2013 MEP. I initially thought it was an out of box command but have found it wasn't. It's very helpful in isolating an object that is in an xref'd drawing to either freeze it or change lineytpe, etc.. Does anyone know how I can recreate?
  20. Hi everyone, Just trying to pass a list of points to a "pline" command. The problem is num of points is initially unknown, though being calculated within a routine. The following code (as smth to start with) evolves known num of points. (defun c:pltest6 () (setq pts (list '(0 0) '(0 10) '(10 10) '(10 20) '(20 20) '(20 30) '(30 30))) (setq ptqty 7) (setq ptnum 0) (command "pline" (car pts) (pt_retr pts) (pt_retr pts) (pt_retr pts) (pt_retr pts) (pt_retr pts) (pt_retr pts) "" ) ) (defun pt_retr (lst) (setq ptnum (1+ ptnum)) (repeat ptnum (setq lst (cdr lst)) ) (setq pt (car lst)) ) Repeat/foreach don't do, 'cause they return the value of the last iteration.. Now my Q is, is it possible to modify the code above to use loop instead of repeat one and the same line (moreover, unknown number of times ), OR some other approach would rather fix the task? Thank you in advance, Dmitro
  21. Hello guys, I would like to create a "wave" dynamic block, see below... It is made from wipeout. Is it chance to make a similar? If I make a list for the length (from 125 to 350), after can I make a table /list /summary where these size are shown? Please help me if you can! Thank you! T
  22. I would like to add a drop down list to a block. I would appreciate any help in getting this set up. Ive done a fair amount of research and it appears that things much more complex can be done but this simple task has me stumped. Background: We use the same block (symbol) to represent several different part numbers, but would like to select from a drop down list the actual part number. For example, a beacon symbol is the same no matter what color the beacon, but i would like to be able to select a grip and choose red, green, blue, yellow, ect. I don't want it to do anything to the block, but rather just store the property that is set by the user. Any help would be greatly appreciated. I'm sure this isn't that hard, but i cannot figure it out. Thanks
  23. CADproNY

    Dropdown List

    I am trying to create a dropdown list, what I am looking to do seems simple enough in theory. Just like excel I want to create a data validation (list). option 1, I have read several post's with people who seem to be trying to accomplish the same thing, the answers I am finding are basically saying to paste a link to the excel file. This would be great except the folder the excel file would be in is always re-named from (template) to a specific job name, thus causing my link to break and teaching everyone in the dept. how to re-link the file seems like a pain. option 2, I was thinking of doing a visibility state on an mtext or attribute, I couldn't get the attribute to change visibility states and the visibility state for mtext does not seem like the right solution. option 3, using a table or data extraction in CAD from the pasted in excel file, thus allowing me to create the drop down list. Attached are 2 pictures of the what I am working with, we use an excel file to write out a list of materials (always different) and then we have to re-type or copy and paste these materials into the titleblock. We are using ACAD Arch 2012 & 2013 Thanks in advance for any advice, macros, or solutions !Problem = Need drop down list ---> Want to select the W# ---> Want the description to populate the titleblock from CAD table or excel
  24. Hey All, Is there away to filter a layer list so it doesn't show all the layers in a list box. I want to see only the "Xref-*" layers. I do need the wild card because after the hypen the names vary. Also feel free to offer other suggestions or ways to attached code.Thanks test.dcl test.lsp
  25. I'm trying to filter out plines that are duplicates of each other from a list. I've been trying to compare 1 point in the first pline against the list of points from the other plines. They will only share a point if they are identical for this use. I've been trying to work this out on my own but it has becaome a complete mess and I know there must be a simpler way. This code works but has no way of checking the last pline. comparepts is a list of lists of the points on the plines nubpaths is a list of the pline entity names Help if you can please. (setq compctr1 0 ctr 0 numnubs (length nubpaths) nlist (list) ) (while (< compctr1 (- numnubs 1)) (setq compctr2 (+ compctr1 1)) (while (and (< compctr2 numnubs) (not reject)) (setq complngth (length (nth compctr2 comparepts))) (setq compctr3 0) (while (and (< compctr3 complngth) (not (equal (car (nth compctr1 comparepts)) (nth compctr3 (nth compctr2 comparepts)) 0.00009))) (setq compctr3 (+ compctr3 1)) ) ;_ end of while (if (/= compctr3 complngth) (setq reject T) ) ;_ end of if (setq compctr2 (+ compctr2 1)) (if (= compctr2 numnubs) (setq nlist (append nlist (list (nth compctr1 nubpaths)))) ) ) ;_ end of while (setq compctr1 (+ compctr1 1) reject nil ) ) ;_ end of while
×