<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: XLIST and NCOPY in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/xlist-and-ncopy/m-p/9987524#M65657</link>
    <description>Ahh, something new to learn!&lt;BR /&gt;Thanks, Moshe.</description>
    <pubDate>Fri, 08 Jan 2021 14:43:20 GMT</pubDate>
    <dc:creator>john.uhden</dc:creator>
    <dc:date>2021-01-08T14:43:20Z</dc:date>
    <item>
      <title>XLIST and NCOPY</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/xlist-and-ncopy/m-p/9986153#M65654</link>
      <description>&lt;P&gt;I am seriously dismayed that these tools provided by AutoCAD are so myopic.&amp;nbsp; I don't necessarily want to list or copy the line embedded in a light pole block inside an xref.&amp;nbsp; I want to list or copy the light pole block insertion.&lt;/P&gt;
&lt;P&gt;It's not very difficult to show the entire lineage of an object including the line within a block within a block within an xref, but two things are holding me back...&lt;/P&gt;
&lt;P&gt;1.&amp;nbsp; I would like to name the commands different from the AutoCAD commands, but there's no consistency...&lt;BR /&gt;XLIST starts with an X, but NCOPY starts with an N.&amp;nbsp; If they both started with an N or an X, then mine could be the opposite.&amp;nbsp; Hmm, maybe I'll name them JLIST and JCOPY for my first name, or ULIST and UCOPY for my last name.&amp;nbsp; Maybe ARGH and BAZONGA would be better.&lt;/P&gt;
&lt;P&gt;2.&amp;nbsp; For XLIST, I would want to show not all but most properties including such as length and area for which I must also include scale.&amp;nbsp; Anyway, I'm thinking that a regular DCL would not have the room to have enough columns to display all the properties, unless I cut some out.&amp;nbsp; So, I'm wondering if ObjectDCL would be a solution.&amp;nbsp; I have never tried it, and I wonder if you can wrap it up into a single .VLX.&lt;/P&gt;
&lt;P&gt;Might anyone have some wisdom on this?&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jan 2021 01:16:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/xlist-and-ncopy/m-p/9986153#M65654</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2021-01-08T01:16:31Z</dc:date>
    </item>
    <item>
      <title>Re: XLIST and NCOPY</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/xlist-and-ncopy/m-p/9986344#M65655</link>
      <description>&lt;P&gt;maybe something like this it lets you select what properties you want using a list of propeties more can be added.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;; properties use as a library function
; By Alan H july 2020

(defun cords (obj / co-ords xy )
(setq coordsxy '())
(setq co-ords (vlax-get obj 'Coordinates))
(setq numb (/ (length co-ords) 2))
(setq I 0)
(repeat numb
(setq xy (list (nth (+ I 1) co-ords)(nth I co-ords) ))
(setq coordsxy (cons xy coordsxy))
(setq I (+ I 2))
)
)


(defun AH:chkcwccw (obj / lst newarea)
(setq lst (CORDS obj))
(setq newarea
(/ (apply (function +)
            (mapcar (function (lambda (x y)
                                (- (* (car x) (cadr y)) (* (car y) (cadr x)))))
                    (cons (last lst) lst)
                    l)) 
2.)
)
(if (&amp;lt; newarea  0)
(setq cw "F")
(setq cw "T")
)
)

; Can use reverse in Autocad - pedit reverse in Bricscad.

(defun plprops (obj txt / lst)
(foreach val lst
(cond
((= (strcase val)  "LAY") (setq lay (vla-get-layer obj)))
((= (strcase val) "AREA")(setq area (vla-get-area obj)))
((= (strcase val) "START")(setq start (vlax-curve-getstartpoint obj)))
((= (strcase val) "END" (strcase txt))(setq end (vlax-curve-getendpoint obj)))
((= (strcase val) "LEN" (strcase txt))(setq len (vlax-get obj 'Length)))
((= (strcase val) "CW" (strcase txt))(AH:chkcwccw obj))
((= (strcase val) "CORDS" (strcase txt))(CORDS obj))
)
)
)

(defun lineprops (obj lst / )
(foreach val lst
(cond
((= (strcase val)  "LAY") (setq lay (vlax-get obj 'layer)))
((= (strcase val) "START")(setq start (vlax-get obj 'startpoint)))
((= (strcase val) "END" (strcase txt))(setq end (vlax-get obj 'endpoint)))
((= (strcase val) "LEN" (strcase txt))(setq len (vlax-get obj 'Length)))
)
)
)

(defun circprops (obj lst / )
(foreach val lst
(cond
((= (strcase val)  "LAY") (setq lay (vlax-get obj 'layer)))
((= (strcase val) "LEN" (strcase txt))(setq len (vlax-get obj 'Circumference)))
((= (strcase val) "RAD" (strcase txt))(setq rad (vla-get-radius obj)))
((= (strcase val) "CEN" (strcase txt))(setq cen (vlax-get obj 'Center)))
((= (strcase val) "START")(setq start (vlax-get obj 'startpoint)))
((= (strcase val) "END" (strcase txt))(setq end (vlax-get obj 'endpoint)))
((= (strcase val) "AREA" (strcase txt))(setq end (vlax-get obj 'AREA)))
)
)
)

(defun arcprops (obj txtlst)
(foreach val lst
(cond
((= (strcase val)  "LAY") (setq lay (vlax-get obj 'layer)))
((= (strcase val) "LEN" (strcase txt))(setq len (vlax-get obj 'length)))
((= (strcase val) "RAD" (strcase txt))(setq rad (vla-get-radius obj)))
((= (strcase val) "CEN" (strcase txt))(setq cen (vlax-get obj 'Center)))
((= (strcase val) "START" (strcase txt))(setq area (vlax-get obj 'startpoint)))
((= (strcase val) "END" (strcase txt))(setq area (vlax-get obj 'endpoint)))
((= (strcase val) "AREA" (strcase txt))(setq end (vlax-get obj 'AREA)))
)
)
)

; starts here
(setq ent (vlax-ename-&amp;gt;vla-object (car (entsel "Pick Object "))))
; do a check for object type then use defun
; pick an example below


; many examples copy to command line for testing mix and match 
; (plprops ent '("LAY"))(princ lay)
; (plprops ent '("END"))(princ end)
; (plprops ent '("START"))(princ start)
; (plprops ent '("END" "START"))(princ end)(princ start)
; (plprops ent '("AREA" "LAY" "END" "START"))(princ area)(princ lay)(princ end)(princ start)
; (plprops ent '("START" "AREA" "LAY" "CW"))(princ start)(princ area)(princ cw)
; (plprops ent '("start" "END" "CORDS" "cw"))(princ start)(princ end)(princ coordsxy)(princ cw)
; (plprops ent '("CW"))(princ cw)
; (plprops ent '("AREA"))(princ area)
; (plprops ent '("CORDS"))(princ coordsxy)
; (lineprops ent "len"))(princ len)
; (lineprops ent '("len" "lay"))(princ len)(princ lay)
; (lineprops ent '("lay" "end" "start" "len"))(princ len)(princ lay)(princ start)(princ end)
; (circprops ent '("lay" "rad" "area" "cen"))(princ lay)(princ rad)(princ area)(princ cen)
; (circprops ent '("lay" "rad"))
; (arcprops ent '("lay" "rad"))&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 08 Jan 2021 04:23:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/xlist-and-ncopy/m-p/9986344#M65655</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2021-01-08T04:23:48Z</dc:date>
    </item>
    <item>
      <title>Re: XLIST and NCOPY</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/xlist-and-ncopy/m-p/9986854#M65656</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3930636"&gt;@john.uhden&lt;/a&gt;&amp;nbsp; hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;I'm wondering if ObjectDCL would be a solution.&amp;nbsp; I have never tried it, and I wonder if you can wrap it up into a single .VLX.&lt;/P&gt;&lt;P&gt;Might anyone have some wisdom on this?&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;This year i did 3 'projects' with OpenDCL and it's great ARX application. easy to learn and use and yes, you can wrap it all into single VLX.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Moshe&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jan 2021 10:07:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/xlist-and-ncopy/m-p/9986854#M65656</guid>
      <dc:creator>Moshe-A</dc:creator>
      <dc:date>2021-01-08T10:07:51Z</dc:date>
    </item>
    <item>
      <title>Re: XLIST and NCOPY</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/xlist-and-ncopy/m-p/9987524#M65657</link>
      <description>Ahh, something new to learn!&lt;BR /&gt;Thanks, Moshe.</description>
      <pubDate>Fri, 08 Jan 2021 14:43:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/xlist-and-ncopy/m-p/9987524#M65657</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2021-01-08T14:43:20Z</dc:date>
    </item>
    <item>
      <title>Re: XLIST and NCOPY</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/xlist-and-ncopy/m-p/9988775#M65658</link>
      <description>&lt;P&gt;I dont see any real problem in displaying properties in a dcl if you look at my Multi getvals.lsp it is dynamic so you could have as many lines as you want displayed from 1 to around 20, max is to do with screen size.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It uses a simple list for the dcl so number of rows = list a second list would have the value and uses the set_tile to display the value,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;(setq props (list "This is heading" "ARC" 5 4 "11" "Center"  5 4 "2,2" "Radius" 5 4 "33" "Layer" 15 14 "Arcs"))
(setq ans (AH:getvalsm props))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;So you would just create the "list"&amp;nbsp; as a strcat of values.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="screenshot313.png" style="width: 205px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/864250i1922C471C45CA708/image-size/large?v=v2&amp;amp;px=999" role="button" title="screenshot313.png" alt="screenshot313.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jan 2021 23:12:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/xlist-and-ncopy/m-p/9988775#M65658</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2021-01-08T23:12:00Z</dc:date>
    </item>
    <item>
      <title>Re: XLIST and NCOPY</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/xlist-and-ncopy/m-p/9988821#M65659</link>
      <description>&lt;P&gt;That is a clever idea, Alan.&lt;/P&gt;
&lt;P&gt;For "ULIST" I had been thinking of one dialog showing the properties of the entire ancestry, but it could work better by having a list_box that shows each of the ancestors with a button to show the details of the one selected.&lt;/P&gt;
&lt;P&gt;For "UCOPY" you need only the list_box with basic data like block name or objectname and layer and IsXref.&amp;nbsp; Or "UCOPY" could display the properties a la "ULIST" but with a "Copy" button, which means I need only one command function, maybe like "XTRACT" or "XTACY" or "XFILE" but I think Mulder and Scully might disaprove of the last.&amp;nbsp; Plus I might get ported through some worm hole to our ancient alien ancestors.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jan 2021 23:50:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/xlist-and-ncopy/m-p/9988821#M65659</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2021-01-08T23:50:43Z</dc:date>
    </item>
  </channel>
</rss>

