<?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 Inserting an attribute from a lisp routine in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/inserting-an-attribute-from-a-lisp-routine/m-p/864106#M163029</link>
    <description>I have used a simple routine to xref in a title block, then insert an&lt;BR /&gt;
attribute on the title block. In R14 with attdia set to "1" the attribute&lt;BR /&gt;
would prompt for information via a dialog box, now it will only insert and&lt;BR /&gt;
prompt for info via the command line, this will not work for me......the&lt;BR /&gt;
line of code is as follows&lt;BR /&gt;
&lt;BR /&gt;
(command "insert" "cdrev" (list 0.0 0.0) 4 "" 0)&lt;BR /&gt;
&lt;BR /&gt;
If you take the "0" off the end it almost works, but you have to enter the&lt;BR /&gt;
rotation angle manually, then you get the dialog box.</description>
    <pubDate>Thu, 04 Nov 1999 21:35:41 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>1999-11-04T21:35:41Z</dc:date>
    <item>
      <title>Inserting an attribute from a lisp routine</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/inserting-an-attribute-from-a-lisp-routine/m-p/864106#M163029</link>
      <description>I have used a simple routine to xref in a title block, then insert an&lt;BR /&gt;
attribute on the title block. In R14 with attdia set to "1" the attribute&lt;BR /&gt;
would prompt for information via a dialog box, now it will only insert and&lt;BR /&gt;
prompt for info via the command line, this will not work for me......the&lt;BR /&gt;
line of code is as follows&lt;BR /&gt;
&lt;BR /&gt;
(command "insert" "cdrev" (list 0.0 0.0) 4 "" 0)&lt;BR /&gt;
&lt;BR /&gt;
If you take the "0" off the end it almost works, but you have to enter the&lt;BR /&gt;
rotation angle manually, then you get the dialog box.</description>
      <pubDate>Thu, 04 Nov 1999 21:35:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/inserting-an-attribute-from-a-lisp-routine/m-p/864106#M163029</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>1999-11-04T21:35:41Z</dc:date>
    </item>
    <item>
      <title>Re: Inserting an attribute from a lisp routine</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/inserting-an-attribute-from-a-lisp-routine/m-p/864107#M163030</link>
      <description>By the way this problem is only in Acad2000, it used to work in acad R14&lt;BR /&gt;
&lt;BR /&gt;
Shane Christmas &lt;SCHRISTMAS&gt; wrote in message&lt;BR /&gt;
news:7vsuas$98u24@adesknews2.autodesk.com...&lt;BR /&gt;
&amp;gt; I have used a simple routine to xref in a title block, then insert an&lt;BR /&gt;
&amp;gt; attribute on the title block. In R14 with attdia set to "1" the attribute&lt;BR /&gt;
&amp;gt; would prompt for information via a dialog box, now it will only insert and&lt;BR /&gt;
&amp;gt; prompt for info via the command line, this will not work for me......the&lt;BR /&gt;
&amp;gt; line of code is as follows&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; (command "insert" "cdrev" (list 0.0 0.0) 4 "" 0)&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; If you take the "0" off the end it almost works, but you have to enter the&lt;BR /&gt;
&amp;gt; rotation angle manually, then you get the dialog box.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;/SCHRISTMAS&gt;</description>
      <pubDate>Thu, 04 Nov 1999 21:50:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/inserting-an-attribute-from-a-lisp-routine/m-p/864107#M163030</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>1999-11-04T21:50:49Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/inserting-an-attribute-from-a-lisp-routine/m-p/864108#M163031</link>
      <description>Shane,&lt;BR /&gt;
&lt;BR /&gt;
Try this:&lt;BR /&gt;
&lt;BR /&gt;
(initdia)&lt;BR /&gt;
(command "insert" "cdrev" (list 0.0 0.0) 4 "" 0)&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
Dave D&lt;BR /&gt;
(remove '-' for Email)&lt;BR /&gt;
&lt;BR /&gt;
Shane Christmas &lt;SCHRISTMAS&gt; wrote in article&lt;BR /&gt;
&amp;lt;7vsv7q$9aj29@adesknews2.autodesk.com&amp;gt;...&lt;BR /&gt;
&amp;gt; By the way this problem is only in Acad2000, it used to work in acad R14&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; Shane Christmas &lt;SCHRISTMAS&gt; wrote in message&lt;BR /&gt;
&amp;gt; news:7vsuas$98u24@adesknews2.autodesk.com...&lt;BR /&gt;
&amp;gt; &amp;gt; I have used a simple routine to xref in a title block, then insert an&lt;BR /&gt;
&amp;gt; &amp;gt; attribute on the title block. In R14 with attdia set to "1" the&lt;BR /&gt;
attribute&lt;BR /&gt;
&amp;gt; &amp;gt; would prompt for information via a dialog box, now it will only insert&lt;BR /&gt;
and&lt;BR /&gt;
&amp;gt; &amp;gt; prompt for info via the command line, this will not work for&lt;BR /&gt;
me......the&lt;BR /&gt;
&amp;gt; &amp;gt; line of code is as follows&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; (command "insert" "cdrev" (list 0.0 0.0) 4 "" 0)&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; If you take the "0" off the end it almost works, but you have to enter&lt;BR /&gt;
the&lt;BR /&gt;
&amp;gt; &amp;gt; rotation angle manually, then you get the dialog box.&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt;&lt;/SCHRISTMAS&gt;&lt;/SCHRISTMAS&gt;</description>
      <pubDate>Thu, 04 Nov 1999 22:23:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/inserting-an-attribute-from-a-lisp-routine/m-p/864108#M163031</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>1999-11-04T22:23:10Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/inserting-an-attribute-from-a-lisp-routine/m-p/864109#M163032</link>
      <description>Thanks, but that did not work.......it simply prompts me for the INSERT&lt;BR /&gt;
DIALOG, I am looking for the attribute dialog box that prompts your for&lt;BR /&gt;
information based on the attribute. For example, if you want to attribute to&lt;BR /&gt;
prompt you for a sheet number, instead of it prompting you at the command&lt;BR /&gt;
line, it would prompt you from a dialog box.&lt;BR /&gt;
&lt;BR /&gt;
David Doane &lt;LECTRO-MECH&gt; wrote in message&lt;BR /&gt;
news:01bf2713$2b488ca0$6255d2d0@lms-1...&lt;BR /&gt;
&amp;gt; Shane,&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Try this:&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; (initdia)&lt;BR /&gt;
&amp;gt; (command "insert" "cdrev" (list 0.0 0.0) 4 "" 0)&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; --&lt;BR /&gt;
&amp;gt; Dave D&lt;BR /&gt;
&amp;gt; (remove '-' for Email)&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Shane Christmas &lt;SCHRISTMAS&gt; wrote in article&lt;BR /&gt;
&amp;gt; &amp;lt;7vsv7q$9aj29@adesknews2.autodesk.com&amp;gt;...&lt;BR /&gt;
&amp;gt; &amp;gt; By the way this problem is only in Acad2000, it used to work in acad R14&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; Shane Christmas &lt;SCHRISTMAS&gt; wrote in message&lt;BR /&gt;
&amp;gt; &amp;gt; news:7vsuas$98u24@adesknews2.autodesk.com...&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; I have used a simple routine to xref in a title block, then insert an&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; attribute on the title block. In R14 with attdia set to "1" the&lt;BR /&gt;
&amp;gt; attribute&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; would prompt for information via a dialog box, now it will only insert&lt;BR /&gt;
&amp;gt; and&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; prompt for info via the command line, this will not work for&lt;BR /&gt;
&amp;gt; me......the&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; line of code is as follows&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; (command "insert" "cdrev" (list 0.0 0.0) 4 "" 0)&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; If you take the "0" off the end it almost works, but you have to enter&lt;BR /&gt;
&amp;gt; the&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; rotation angle manually, then you get the dialog box.&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;/SCHRISTMAS&gt;&lt;/SCHRISTMAS&gt;&lt;/LECTRO-MECH&gt;</description>
      <pubDate>Fri, 05 Nov 1999 15:26:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/inserting-an-attribute-from-a-lisp-routine/m-p/864109#M163032</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>1999-11-05T15:26:12Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/inserting-an-attribute-from-a-lisp-routine/m-p/864110#M163033</link>
      <description>Try this, should work in r12 - a2k:&lt;BR /&gt;
&lt;BR /&gt;
(setq ad (getvar "attdia")) ar (getvar "attreq"))&lt;BR /&gt;
(setvar "attdia" 0)&lt;BR /&gt;
(setvar "attreq" 0)&lt;BR /&gt;
(command ".insert" "cdrev" (list 0.0 0.0) 4.0 "" 0.0)&lt;BR /&gt;
(if (eq 1 (cdr (assoc 66 (entget (entlast)))))&lt;BR /&gt;
  (command ".ddatte" (entlast))&lt;BR /&gt;
)&lt;BR /&gt;
(setvar "attdia" ad)&lt;BR /&gt;
(setvar "attreq" ar)&lt;BR /&gt;
&lt;BR /&gt;
__________________________________&lt;BR /&gt;
&lt;BR /&gt;
Michael Puckett&lt;BR /&gt;
mailto:puckettm@cadvision.com&lt;BR /&gt;
&amp;gt; Not &amp;lt; an AutoDesk classroom  monitor.&lt;BR /&gt;
Imagination makes all things possible&lt;BR /&gt;
__________________________________&lt;BR /&gt;
&lt;BR /&gt;
Shane Christmas &lt;SCHRISTMAS&gt; wrote in message&lt;BR /&gt;
news:7vut0l$dal16@adesknews2.autodesk.com...&lt;BR /&gt;
Thanks, but that did not work.......it simply prompts me for the INSERT&lt;BR /&gt;
DIALOG, I am looking for the attribute dialog box that prompts your for&lt;BR /&gt;
information based on the attribute. For example, if you want to attribute to&lt;BR /&gt;
prompt you for a sheet number, instead of it prompting you at the command&lt;BR /&gt;
line, it would prompt you from a dialog box.&lt;BR /&gt;
&lt;BR /&gt;
David Doane &lt;LECTRO-MECH&gt; wrote in message&lt;BR /&gt;
news:01bf2713$2b488ca0$6255d2d0@lms-1...&lt;BR /&gt;
&amp;gt; Shane,&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Try this:&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; (initdia)&lt;BR /&gt;
&amp;gt; (command "insert" "cdrev" (list 0.0 0.0) 4 "" 0)&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; --&lt;BR /&gt;
&amp;gt; Dave D&lt;BR /&gt;
&amp;gt; (remove '-' for Email)&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Shane Christmas &lt;SCHRISTMAS&gt; wrote in article&lt;BR /&gt;
&amp;gt; &amp;lt;7vsv7q$9aj29@adesknews2.autodesk.com&amp;gt;...&lt;BR /&gt;
&amp;gt; &amp;gt; By the way this problem is only in Acad2000, it used to work in acad R14&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; Shane Christmas &lt;SCHRISTMAS&gt; wrote in message&lt;BR /&gt;
&amp;gt; &amp;gt; news:7vsuas$98u24@adesknews2.autodesk.com...&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; I have used a simple routine to xref in a title block, then insert an&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; attribute on the title block. In R14 with attdia set to "1" the&lt;BR /&gt;
&amp;gt; attribute&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; would prompt for information via a dialog box, now it will only insert&lt;BR /&gt;
&amp;gt; and&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; prompt for info via the command line, this will not work for&lt;BR /&gt;
&amp;gt; me......the&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; line of code is as follows&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; (command "insert" "cdrev" (list 0.0 0.0) 4 "" 0)&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; If you take the "0" off the end it almost works, but you have to enter&lt;BR /&gt;
&amp;gt; the&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; rotation angle manually, then you get the dialog box.&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;/SCHRISTMAS&gt;&lt;/SCHRISTMAS&gt;&lt;/LECTRO-MECH&gt;&lt;/SCHRISTMAS&gt;</description>
      <pubDate>Fri, 05 Nov 1999 15:44:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/inserting-an-attribute-from-a-lisp-routine/m-p/864110#M163033</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>1999-11-05T15:44:31Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/inserting-an-attribute-from-a-lisp-routine/m-p/864111#M163034</link>
      <description>Doh, typo.&lt;BR /&gt;
&lt;BR /&gt;
&amp;gt;&amp;gt;&amp;gt; (setq ad (getvar "attdia") ar (getvar "attreq"))&lt;BR /&gt;
&lt;BR /&gt;
Making the whole thing a generic function ...&lt;BR /&gt;
&lt;BR /&gt;
(defun insert-attdia (block point scale rotation / ce ad ar)&lt;BR /&gt;
  (cond&lt;BR /&gt;
    ( (tblsearch "block" block)&lt;BR /&gt;
      (if (null point) (setq point '(0 0 0)))&lt;BR /&gt;
      (if (null scale) (setq scale 1.0))&lt;BR /&gt;
      (if (null rotation) (setq rotation 0.0))&lt;BR /&gt;
      (setq&lt;BR /&gt;
        ce (getvar "cmdecho")&lt;BR /&gt;
        ad (getvar "attdia")&lt;BR /&gt;
        ar (getvar "attreq")&lt;BR /&gt;
      )&lt;BR /&gt;
      (setvar "cmdecho" 0)&lt;BR /&gt;
      (setvar "attdia" 0)&lt;BR /&gt;
      (setvar "attreq" 0)&lt;BR /&gt;
      (command ".insert" block point scale "" rotation)&lt;BR /&gt;
      (if (eq 1 (cdr (assoc 66 (entget (entlast)))))&lt;BR /&gt;
        (command ".ddatte" (entlast))&lt;BR /&gt;
      )&lt;BR /&gt;
      (setvar "cmdecho" ce)&lt;BR /&gt;
      (setvar "attdia" ad)&lt;BR /&gt;
      (setvar "attreq" ar)&lt;BR /&gt;
    )&lt;BR /&gt;
    ( t (princ (strcat "\nError, block &amp;lt;" block "&amp;gt; not found.")))&lt;BR /&gt;
  )&lt;BR /&gt;
  (princ)&lt;BR /&gt;
)&lt;BR /&gt;
&lt;BR /&gt;
Thus, you could use as follows:&lt;BR /&gt;
&lt;BR /&gt;
  (insert-attdia "cdrev" '(0 0 0) 1.0 0)&lt;BR /&gt;
&lt;BR /&gt;
  (inset-attdia "cdrev" nil nil nil)&lt;BR /&gt;
&lt;BR /&gt;
The latter example would resort to defaults you placed in the function; as&lt;BR /&gt;
is, those would be '(0 0 0) 1.0 and 0 for the insert point, scale and&lt;BR /&gt;
rotation respectively.  Obviiously you can change those to what is most&lt;BR /&gt;
common for your apps.&lt;BR /&gt;
&lt;BR /&gt;
A strong argument for using a library based function would be that if future&lt;BR /&gt;
versions of AutoCAD (should AutoDesk recover from anemic stock prices) break&lt;BR /&gt;
existing code (again) all you have to do is fix the function.  Otherwise,&lt;BR /&gt;
you have to scan all your programs, and edit each instance accordingly.&lt;BR /&gt;
Blech.&lt;BR /&gt;
&lt;BR /&gt;
__________________________________&lt;BR /&gt;
&lt;BR /&gt;
Michael Puckett&lt;BR /&gt;
mailto:puckettm@cadvision.com&lt;BR /&gt;
&amp;gt; Not &amp;lt; an AutoDesk classroom  monitor.&lt;BR /&gt;
Imagination makes all things possible&lt;BR /&gt;
__________________________________&lt;BR /&gt;
&lt;BR /&gt;
Michael Puckett &lt;PUCKETTM&gt; wrote in message&lt;BR /&gt;
news:7vutt2$d8p15@adesknews2.autodesk.com...&lt;BR /&gt;
Try this, should work in r12 - a2k:&lt;BR /&gt;
&lt;BR /&gt;
(setq ad (getvar "attdia")) ar (getvar "attreq"))&lt;BR /&gt;
(setvar "attdia" 0)&lt;BR /&gt;
(setvar "attreq" 0)&lt;BR /&gt;
(command ".insert" "cdrev" (list 0.0 0.0) 4.0 "" 0.0)&lt;BR /&gt;
(if (eq 1 (cdr (assoc 66 (entget (entlast)))))&lt;BR /&gt;
  (command ".ddatte" (entlast))&lt;BR /&gt;
)&lt;BR /&gt;
(setvar "attdia" ad)&lt;BR /&gt;
(setvar "attreq" ar)&lt;BR /&gt;
&lt;BR /&gt;
__________________________________&lt;BR /&gt;
&lt;BR /&gt;
Michael Puckett&lt;BR /&gt;
mailto:puckettm@cadvision.com&lt;BR /&gt;
&amp;gt; Not &amp;lt; an AutoDesk classroom  monitor.&lt;BR /&gt;
Imagination makes all things possible&lt;BR /&gt;
__________________________________&lt;BR /&gt;
&lt;BR /&gt;
Shane Christmas &lt;SCHRISTMAS&gt; wrote in message&lt;BR /&gt;
news:7vut0l$dal16@adesknews2.autodesk.com...&lt;BR /&gt;
Thanks, but that did not work.......it simply prompts me for the INSERT&lt;BR /&gt;
DIALOG, I am looking for the attribute dialog box that prompts your for&lt;BR /&gt;
information based on the attribute. For example, if you want to attribute to&lt;BR /&gt;
prompt you for a sheet number, instead of it prompting you at the command&lt;BR /&gt;
line, it would prompt you from a dialog box.&lt;BR /&gt;
&lt;BR /&gt;
David Doane &lt;LECTRO-MECH&gt; wrote in message&lt;BR /&gt;
news:01bf2713$2b488ca0$6255d2d0@lms-1...&lt;BR /&gt;
&amp;gt; Shane,&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Try this:&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; (initdia)&lt;BR /&gt;
&amp;gt; (command "insert" "cdrev" (list 0.0 0.0) 4 "" 0)&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; --&lt;BR /&gt;
&amp;gt; Dave D&lt;BR /&gt;
&amp;gt; (remove '-' for Email)&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Shane Christmas &lt;SCHRISTMAS&gt; wrote in article&lt;BR /&gt;
&amp;gt; &amp;lt;7vsv7q$9aj29@adesknews2.autodesk.com&amp;gt;...&lt;BR /&gt;
&amp;gt; &amp;gt; By the way this problem is only in Acad2000, it used to work in acad R14&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; Shane Christmas &lt;SCHRISTMAS&gt; wrote in message&lt;BR /&gt;
&amp;gt; &amp;gt; news:7vsuas$98u24@adesknews2.autodesk.com...&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; I have used a simple routine to xref in a title block, then insert an&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; attribute on the title block. In R14 with attdia set to "1" the&lt;BR /&gt;
&amp;gt; attribute&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; would prompt for information via a dialog box, now it will only insert&lt;BR /&gt;
&amp;gt; and&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; prompt for info via the command line, this will not work for&lt;BR /&gt;
&amp;gt; me......the&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; line of code is as follows&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; (command "insert" "cdrev" (list 0.0 0.0) 4 "" 0)&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; If you take the "0" off the end it almost works, but you have to enter&lt;BR /&gt;
&amp;gt; the&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; rotation angle manually, then you get the dialog box.&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;/SCHRISTMAS&gt;&lt;/SCHRISTMAS&gt;&lt;/LECTRO-MECH&gt;&lt;/SCHRISTMAS&gt;&lt;/PUCKETTM&gt;</description>
      <pubDate>Fri, 05 Nov 1999 16:16:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/inserting-an-attribute-from-a-lisp-routine/m-p/864111#M163034</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>1999-11-05T16:16:57Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/inserting-an-attribute-from-a-lisp-routine/m-p/864112#M163035</link>
      <description>That worked, but a new issue has arose. This lisp now depends on the fact&lt;BR /&gt;
the attributed block must be defined in the drawing already, I have the&lt;BR /&gt;
search path set to the proper directory, but the block (in this case&lt;BR /&gt;
"cdrev") can not be found without first inserting the block in the drawing,&lt;BR /&gt;
then the lisp will insert the block with the attribute dialog. I really&lt;BR /&gt;
appreciate the help.....if you know how to fix this one then&lt;BR /&gt;
please.....HELP.....thanks again&lt;BR /&gt;
&lt;BR /&gt;
Michael Puckett &lt;PUCKETTM&gt; wrote in message&lt;BR /&gt;
news:7vuvpv$dam33@adesknews2.autodesk.com...&lt;BR /&gt;
&amp;gt; Doh, typo.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt;&amp;gt;&amp;gt; (setq ad (getvar "attdia") ar (getvar "attreq"))&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Making the whole thing a generic function ...&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; (defun insert-attdia (block point scale rotation / ce ad ar)&lt;BR /&gt;
&amp;gt;   (cond&lt;BR /&gt;
&amp;gt;     ( (tblsearch "block" block)&lt;BR /&gt;
&amp;gt;       (if (null point) (setq point '(0 0 0)))&lt;BR /&gt;
&amp;gt;       (if (null scale) (setq scale 1.0))&lt;BR /&gt;
&amp;gt;       (if (null rotation) (setq rotation 0.0))&lt;BR /&gt;
&amp;gt;       (setq&lt;BR /&gt;
&amp;gt;         ce (getvar "cmdecho")&lt;BR /&gt;
&amp;gt;         ad (getvar "attdia")&lt;BR /&gt;
&amp;gt;         ar (getvar "attreq")&lt;BR /&gt;
&amp;gt;       )&lt;BR /&gt;
&amp;gt;       (setvar "cmdecho" 0)&lt;BR /&gt;
&amp;gt;       (setvar "attdia" 0)&lt;BR /&gt;
&amp;gt;       (setvar "attreq" 0)&lt;BR /&gt;
&amp;gt;       (command ".insert" block point scale "" rotation)&lt;BR /&gt;
&amp;gt;       (if (eq 1 (cdr (assoc 66 (entget (entlast)))))&lt;BR /&gt;
&amp;gt;         (command ".ddatte" (entlast))&lt;BR /&gt;
&amp;gt;       )&lt;BR /&gt;
&amp;gt;       (setvar "cmdecho" ce)&lt;BR /&gt;
&amp;gt;       (setvar "attdia" ad)&lt;BR /&gt;
&amp;gt;       (setvar "attreq" ar)&lt;BR /&gt;
&amp;gt;     )&lt;BR /&gt;
&amp;gt;     ( t (princ (strcat "\nError, block &amp;lt;" block "&amp;gt; not found.")))&lt;BR /&gt;
&amp;gt;   )&lt;BR /&gt;
&amp;gt;   (princ)&lt;BR /&gt;
&amp;gt; )&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Thus, you could use as follows:&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;   (insert-attdia "cdrev" '(0 0 0) 1.0 0)&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;   (inset-attdia "cdrev" nil nil nil)&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; The latter example would resort to defaults you placed in the function; as&lt;BR /&gt;
&amp;gt; is, those would be '(0 0 0) 1.0 and 0 for the insert point, scale and&lt;BR /&gt;
&amp;gt; rotation respectively.  Obviiously you can change those to what is most&lt;BR /&gt;
&amp;gt; common for your apps.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; A strong argument for using a library based function would be that if&lt;BR /&gt;
future&lt;BR /&gt;
&amp;gt; versions of AutoCAD (should AutoDesk recover from anemic stock prices)&lt;BR /&gt;
break&lt;BR /&gt;
&amp;gt; existing code (again) all you have to do is fix the function.  Otherwise,&lt;BR /&gt;
&amp;gt; you have to scan all your programs, and edit each instance accordingly.&lt;BR /&gt;
&amp;gt; Blech.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; __________________________________&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Michael Puckett&lt;BR /&gt;
&amp;gt; mailto:puckettm@cadvision.com&lt;BR /&gt;
&amp;gt; &amp;gt; Not &amp;lt; an AutoDesk classroom  monitor.&lt;BR /&gt;
&amp;gt; Imagination makes all things possible&lt;BR /&gt;
&amp;gt; __________________________________&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Michael Puckett &lt;PUCKETTM&gt; wrote in message&lt;BR /&gt;
&amp;gt; news:7vutt2$d8p15@adesknews2.autodesk.com...&lt;BR /&gt;
&amp;gt; Try this, should work in r12 - a2k:&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; (setq ad (getvar "attdia")) ar (getvar "attreq"))&lt;BR /&gt;
&amp;gt; (setvar "attdia" 0)&lt;BR /&gt;
&amp;gt; (setvar "attreq" 0)&lt;BR /&gt;
&amp;gt; (command ".insert" "cdrev" (list 0.0 0.0) 4.0 "" 0.0)&lt;BR /&gt;
&amp;gt; (if (eq 1 (cdr (assoc 66 (entget (entlast)))))&lt;BR /&gt;
&amp;gt;   (command ".ddatte" (entlast))&lt;BR /&gt;
&amp;gt; )&lt;BR /&gt;
&amp;gt; (setvar "attdia" ad)&lt;BR /&gt;
&amp;gt; (setvar "attreq" ar)&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; __________________________________&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Michael Puckett&lt;BR /&gt;
&amp;gt; mailto:puckettm@cadvision.com&lt;BR /&gt;
&amp;gt; &amp;gt; Not &amp;lt; an AutoDesk classroom  monitor.&lt;BR /&gt;
&amp;gt; Imagination makes all things possible&lt;BR /&gt;
&amp;gt; __________________________________&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Shane Christmas &lt;SCHRISTMAS&gt; wrote in message&lt;BR /&gt;
&amp;gt; news:7vut0l$dal16@adesknews2.autodesk.com...&lt;BR /&gt;
&amp;gt; Thanks, but that did not work.......it simply prompts me for the INSERT&lt;BR /&gt;
&amp;gt; DIALOG, I am looking for the attribute dialog box that prompts your for&lt;BR /&gt;
&amp;gt; information based on the attribute. For example, if you want to attribute&lt;BR /&gt;
to&lt;BR /&gt;
&amp;gt; prompt you for a sheet number, instead of it prompting you at the command&lt;BR /&gt;
&amp;gt; line, it would prompt you from a dialog box.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; David Doane &lt;LECTRO-MECH&gt; wrote in message&lt;BR /&gt;
&amp;gt; news:01bf2713$2b488ca0$6255d2d0@lms-1...&lt;BR /&gt;
&amp;gt; &amp;gt; Shane,&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; Try this:&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; (initdia)&lt;BR /&gt;
&amp;gt; &amp;gt; (command "insert" "cdrev" (list 0.0 0.0) 4 "" 0)&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; --&lt;BR /&gt;
&amp;gt; &amp;gt; Dave D&lt;BR /&gt;
&amp;gt; &amp;gt; (remove '-' for Email)&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; Shane Christmas &lt;SCHRISTMAS&gt; wrote in article&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;lt;7vsv7q$9aj29@adesknews2.autodesk.com&amp;gt;...&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; By the way this problem is only in Acad2000, it used to work in acad&lt;BR /&gt;
R14&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; Shane Christmas &lt;SCHRISTMAS&gt; wrote in message&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; news:7vsuas$98u24@adesknews2.autodesk.com...&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; I have used a simple routine to xref in a title block, then insert&lt;BR /&gt;
an&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; attribute on the title block. In R14 with attdia set to "1" the&lt;BR /&gt;
&amp;gt; &amp;gt; attribute&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; would prompt for information via a dialog box, now it will only&lt;BR /&gt;
insert&lt;BR /&gt;
&amp;gt; &amp;gt; and&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; prompt for info via the command line, this will not work for&lt;BR /&gt;
&amp;gt; &amp;gt; me......the&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; line of code is as follows&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; (command "insert" "cdrev" (list 0.0 0.0) 4 "" 0)&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; If you take the "0" off the end it almost works, but you have to&lt;BR /&gt;
enter&lt;BR /&gt;
&amp;gt; &amp;gt; the&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; rotation angle manually, then you get the dialog box.&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;/SCHRISTMAS&gt;&lt;/SCHRISTMAS&gt;&lt;/LECTRO-MECH&gt;&lt;/SCHRISTMAS&gt;&lt;/PUCKETTM&gt;&lt;/PUCKETTM&gt;</description>
      <pubDate>Fri, 05 Nov 1999 18:02:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/inserting-an-attribute-from-a-lisp-routine/m-p/864112#M163035</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>1999-11-05T18:02:52Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/inserting-an-attribute-from-a-lisp-routine/m-p/864113#M163036</link>
      <description>I have found the solution, earlier in this thread you'll find where David&lt;BR /&gt;
Doane said to use (initdia), this did not work at first, but it was my&lt;BR /&gt;
fault, I did use it properly, I did not however call my command from the&lt;BR /&gt;
command line, I used "insert" instead of "-insert". Thanks for your&lt;BR /&gt;
help.......I can use the code you gave me for a lot of other things.....&lt;BR /&gt;
&lt;BR /&gt;
Michael Puckett &lt;PUCKETTM&gt; wrote in message&lt;BR /&gt;
news:7vuvpv$dam33@adesknews2.autodesk.com...&lt;BR /&gt;
&amp;gt; Doh, typo.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt;&amp;gt;&amp;gt; (setq ad (getvar "attdia") ar (getvar "attreq"))&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Making the whole thing a generic function ...&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; (defun insert-attdia (block point scale rotation / ce ad ar)&lt;BR /&gt;
&amp;gt;   (cond&lt;BR /&gt;
&amp;gt;     ( (tblsearch "block" block)&lt;BR /&gt;
&amp;gt;       (if (null point) (setq point '(0 0 0)))&lt;BR /&gt;
&amp;gt;       (if (null scale) (setq scale 1.0))&lt;BR /&gt;
&amp;gt;       (if (null rotation) (setq rotation 0.0))&lt;BR /&gt;
&amp;gt;       (setq&lt;BR /&gt;
&amp;gt;         ce (getvar "cmdecho")&lt;BR /&gt;
&amp;gt;         ad (getvar "attdia")&lt;BR /&gt;
&amp;gt;         ar (getvar "attreq")&lt;BR /&gt;
&amp;gt;       )&lt;BR /&gt;
&amp;gt;       (setvar "cmdecho" 0)&lt;BR /&gt;
&amp;gt;       (setvar "attdia" 0)&lt;BR /&gt;
&amp;gt;       (setvar "attreq" 0)&lt;BR /&gt;
&amp;gt;       (command ".insert" block point scale "" rotation)&lt;BR /&gt;
&amp;gt;       (if (eq 1 (cdr (assoc 66 (entget (entlast)))))&lt;BR /&gt;
&amp;gt;         (command ".ddatte" (entlast))&lt;BR /&gt;
&amp;gt;       )&lt;BR /&gt;
&amp;gt;       (setvar "cmdecho" ce)&lt;BR /&gt;
&amp;gt;       (setvar "attdia" ad)&lt;BR /&gt;
&amp;gt;       (setvar "attreq" ar)&lt;BR /&gt;
&amp;gt;     )&lt;BR /&gt;
&amp;gt;     ( t (princ (strcat "\nError, block &amp;lt;" block "&amp;gt; not found.")))&lt;BR /&gt;
&amp;gt;   )&lt;BR /&gt;
&amp;gt;   (princ)&lt;BR /&gt;
&amp;gt; )&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Thus, you could use as follows:&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;   (insert-attdia "cdrev" '(0 0 0) 1.0 0)&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;   (inset-attdia "cdrev" nil nil nil)&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; The latter example would resort to defaults you placed in the function; as&lt;BR /&gt;
&amp;gt; is, those would be '(0 0 0) 1.0 and 0 for the insert point, scale and&lt;BR /&gt;
&amp;gt; rotation respectively.  Obviiously you can change those to what is most&lt;BR /&gt;
&amp;gt; common for your apps.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; A strong argument for using a library based function would be that if&lt;BR /&gt;
future&lt;BR /&gt;
&amp;gt; versions of AutoCAD (should AutoDesk recover from anemic stock prices)&lt;BR /&gt;
break&lt;BR /&gt;
&amp;gt; existing code (again) all you have to do is fix the function.  Otherwise,&lt;BR /&gt;
&amp;gt; you have to scan all your programs, and edit each instance accordingly.&lt;BR /&gt;
&amp;gt; Blech.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; __________________________________&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Michael Puckett&lt;BR /&gt;
&amp;gt; mailto:puckettm@cadvision.com&lt;BR /&gt;
&amp;gt; &amp;gt; Not &amp;lt; an AutoDesk classroom  monitor.&lt;BR /&gt;
&amp;gt; Imagination makes all things possible&lt;BR /&gt;
&amp;gt; __________________________________&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Michael Puckett &lt;PUCKETTM&gt; wrote in message&lt;BR /&gt;
&amp;gt; news:7vutt2$d8p15@adesknews2.autodesk.com...&lt;BR /&gt;
&amp;gt; Try this, should work in r12 - a2k:&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; (setq ad (getvar "attdia")) ar (getvar "attreq"))&lt;BR /&gt;
&amp;gt; (setvar "attdia" 0)&lt;BR /&gt;
&amp;gt; (setvar "attreq" 0)&lt;BR /&gt;
&amp;gt; (command ".insert" "cdrev" (list 0.0 0.0) 4.0 "" 0.0)&lt;BR /&gt;
&amp;gt; (if (eq 1 (cdr (assoc 66 (entget (entlast)))))&lt;BR /&gt;
&amp;gt;   (command ".ddatte" (entlast))&lt;BR /&gt;
&amp;gt; )&lt;BR /&gt;
&amp;gt; (setvar "attdia" ad)&lt;BR /&gt;
&amp;gt; (setvar "attreq" ar)&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; __________________________________&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Michael Puckett&lt;BR /&gt;
&amp;gt; mailto:puckettm@cadvision.com&lt;BR /&gt;
&amp;gt; &amp;gt; Not &amp;lt; an AutoDesk classroom  monitor.&lt;BR /&gt;
&amp;gt; Imagination makes all things possible&lt;BR /&gt;
&amp;gt; __________________________________&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Shane Christmas &lt;SCHRISTMAS&gt; wrote in message&lt;BR /&gt;
&amp;gt; news:7vut0l$dal16@adesknews2.autodesk.com...&lt;BR /&gt;
&amp;gt; Thanks, but that did not work.......it simply prompts me for the INSERT&lt;BR /&gt;
&amp;gt; DIALOG, I am looking for the attribute dialog box that prompts your for&lt;BR /&gt;
&amp;gt; information based on the attribute. For example, if you want to attribute&lt;BR /&gt;
to&lt;BR /&gt;
&amp;gt; prompt you for a sheet number, instead of it prompting you at the command&lt;BR /&gt;
&amp;gt; line, it would prompt you from a dialog box.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; David Doane &lt;LECTRO-MECH&gt; wrote in message&lt;BR /&gt;
&amp;gt; news:01bf2713$2b488ca0$6255d2d0@lms-1...&lt;BR /&gt;
&amp;gt; &amp;gt; Shane,&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; Try this:&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; (initdia)&lt;BR /&gt;
&amp;gt; &amp;gt; (command "insert" "cdrev" (list 0.0 0.0) 4 "" 0)&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; --&lt;BR /&gt;
&amp;gt; &amp;gt; Dave D&lt;BR /&gt;
&amp;gt; &amp;gt; (remove '-' for Email)&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; Shane Christmas &lt;SCHRISTMAS&gt; wrote in article&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;lt;7vsv7q$9aj29@adesknews2.autodesk.com&amp;gt;...&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; By the way this problem is only in Acad2000, it used to work in acad&lt;BR /&gt;
R14&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; Shane Christmas &lt;SCHRISTMAS&gt; wrote in message&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; news:7vsuas$98u24@adesknews2.autodesk.com...&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; I have used a simple routine to xref in a title block, then insert&lt;BR /&gt;
an&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; attribute on the title block. In R14 with attdia set to "1" the&lt;BR /&gt;
&amp;gt; &amp;gt; attribute&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; would prompt for information via a dialog box, now it will only&lt;BR /&gt;
insert&lt;BR /&gt;
&amp;gt; &amp;gt; and&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; prompt for info via the command line, this will not work for&lt;BR /&gt;
&amp;gt; &amp;gt; me......the&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; line of code is as follows&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; (command "insert" "cdrev" (list 0.0 0.0) 4 "" 0)&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; If you take the "0" off the end it almost works, but you have to&lt;BR /&gt;
enter&lt;BR /&gt;
&amp;gt; &amp;gt; the&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; rotation angle manually, then you get the dialog box.&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;/SCHRISTMAS&gt;&lt;/SCHRISTMAS&gt;&lt;/LECTRO-MECH&gt;&lt;/SCHRISTMAS&gt;&lt;/PUCKETTM&gt;&lt;/PUCKETTM&gt;</description>
      <pubDate>Fri, 05 Nov 1999 18:11:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/inserting-an-attribute-from-a-lisp-routine/m-p/864113#M163036</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>1999-11-05T18:11:04Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/inserting-an-attribute-from-a-lisp-routine/m-p/864114#M163037</link>
      <description>Shane,&lt;BR /&gt;
&lt;BR /&gt;
Try David's Idea but place a  - (dash) in front of the insert command&lt;BR /&gt;
"-insert".&lt;BR /&gt;
 (initdia)&lt;BR /&gt;
 (command "insert" "cdrev" (list 0.0 0.0) 4 "" 0)&lt;BR /&gt;
&lt;BR /&gt;
hope this helps.&lt;BR /&gt;
&lt;BR /&gt;
Rick&lt;BR /&gt;
&lt;BR /&gt;
Shane Christmas &lt;SCHRISTMAS&gt; wrote in message&lt;BR /&gt;
news:7vut0l$dal16@adesknews2.autodesk.com...&lt;BR /&gt;
&amp;gt; Thanks, but that did not work.......it simply prompts me for the INSERT&lt;BR /&gt;
&amp;gt; DIALOG, I am looking for the attribute dialog box that prompts your for&lt;BR /&gt;
&amp;gt; information based on the attribute. For example, if you want to attribute&lt;BR /&gt;
to&lt;BR /&gt;
&amp;gt; prompt you for a sheet number, instead of it prompting you at the command&lt;BR /&gt;
&amp;gt; line, it would prompt you from a dialog box.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; David Doane &lt;LECTRO-MECH&gt; wrote in message&lt;BR /&gt;
&amp;gt; news:01bf2713$2b488ca0$6255d2d0@lms-1...&lt;BR /&gt;
&amp;gt; &amp;gt; Shane,&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; Try this:&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; (initdia)&lt;BR /&gt;
&amp;gt; &amp;gt; (command "insert" "cdrev" (list 0.0 0.0) 4 "" 0)&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; --&lt;BR /&gt;
&amp;gt; &amp;gt; Dave D&lt;BR /&gt;
&amp;gt; &amp;gt; (remove '-' for Email)&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; Shane Christmas &lt;SCHRISTMAS&gt; wrote in article&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;lt;7vsv7q$9aj29@adesknews2.autodesk.com&amp;gt;...&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; By the way this problem is only in Acad2000, it used to work in acad&lt;BR /&gt;
R14&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; Shane Christmas &lt;SCHRISTMAS&gt; wrote in message&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; news:7vsuas$98u24@adesknews2.autodesk.com...&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; I have used a simple routine to xref in a title block, then insert&lt;BR /&gt;
an&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; attribute on the title block. In R14 with attdia set to "1" the&lt;BR /&gt;
&amp;gt; &amp;gt; attribute&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; would prompt for information via a dialog box, now it will only&lt;BR /&gt;
insert&lt;BR /&gt;
&amp;gt; &amp;gt; and&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; prompt for info via the command line, this will not work for&lt;BR /&gt;
&amp;gt; &amp;gt; me......the&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; line of code is as follows&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; (command "insert" "cdrev" (list 0.0 0.0) 4 "" 0)&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; If you take the "0" off the end it almost works, but you have to&lt;BR /&gt;
enter&lt;BR /&gt;
&amp;gt; &amp;gt; the&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; rotation angle manually, then you get the dialog box.&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;/SCHRISTMAS&gt;&lt;/SCHRISTMAS&gt;&lt;/LECTRO-MECH&gt;&lt;/SCHRISTMAS&gt;</description>
      <pubDate>Fri, 05 Nov 1999 18:11:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/inserting-an-attribute-from-a-lisp-routine/m-p/864114#M163037</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>1999-11-05T18:11:43Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/inserting-an-attribute-from-a-lisp-routine/m-p/864115#M163038</link>
      <description>It worked, I found that one a few minutes ago....thanks......&lt;BR /&gt;
Rick Keller &lt;RICK&gt; wrote in message&lt;BR /&gt;
news:7vv6ec$fhl7@adesknews2.autodesk.com...&lt;BR /&gt;
&amp;gt; Shane,&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Try David's Idea but place a  - (dash) in front of the insert command&lt;BR /&gt;
&amp;gt; "-insert".&lt;BR /&gt;
&amp;gt;  (initdia)&lt;BR /&gt;
&amp;gt;  (command "insert" "cdrev" (list 0.0 0.0) 4 "" 0)&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; hope this helps.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Rick&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Shane Christmas &lt;SCHRISTMAS&gt; wrote in message&lt;BR /&gt;
&amp;gt; news:7vut0l$dal16@adesknews2.autodesk.com...&lt;BR /&gt;
&amp;gt; &amp;gt; Thanks, but that did not work.......it simply prompts me for the INSERT&lt;BR /&gt;
&amp;gt; &amp;gt; DIALOG, I am looking for the attribute dialog box that prompts your for&lt;BR /&gt;
&amp;gt; &amp;gt; information based on the attribute. For example, if you want to&lt;BR /&gt;
attribute&lt;BR /&gt;
&amp;gt; to&lt;BR /&gt;
&amp;gt; &amp;gt; prompt you for a sheet number, instead of it prompting you at the&lt;BR /&gt;
command&lt;BR /&gt;
&amp;gt; &amp;gt; line, it would prompt you from a dialog box.&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; David Doane &lt;LECTRO-MECH&gt; wrote in message&lt;BR /&gt;
&amp;gt; &amp;gt; news:01bf2713$2b488ca0$6255d2d0@lms-1...&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; Shane,&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; Try this:&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; (initdia)&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; (command "insert" "cdrev" (list 0.0 0.0) 4 "" 0)&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; --&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; Dave D&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; (remove '-' for Email)&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; Shane Christmas &lt;SCHRISTMAS&gt; wrote in article&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;lt;7vsv7q$9aj29@adesknews2.autodesk.com&amp;gt;...&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; By the way this problem is only in Acad2000, it used to work in acad&lt;BR /&gt;
&amp;gt; R14&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; Shane Christmas &lt;SCHRISTMAS&gt; wrote in message&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; news:7vsuas$98u24@adesknews2.autodesk.com...&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; I have used a simple routine to xref in a title block, then insert&lt;BR /&gt;
&amp;gt; an&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; attribute on the title block. In R14 with attdia set to "1" the&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; attribute&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; would prompt for information via a dialog box, now it will only&lt;BR /&gt;
&amp;gt; insert&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; and&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; prompt for info via the command line, this will not work for&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; me......the&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; line of code is as follows&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; (command "insert" "cdrev" (list 0.0 0.0) 4 "" 0)&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; If you take the "0" off the end it almost works, but you have to&lt;BR /&gt;
&amp;gt; enter&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; the&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; rotation angle manually, then you get the dialog box.&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;/SCHRISTMAS&gt;&lt;/SCHRISTMAS&gt;&lt;/LECTRO-MECH&gt;&lt;/SCHRISTMAS&gt;&lt;/RICK&gt;</description>
      <pubDate>Fri, 05 Nov 1999 18:13:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/inserting-an-attribute-from-a-lisp-routine/m-p/864115#M163038</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>1999-11-05T18:13:49Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/inserting-an-attribute-from-a-lisp-routine/m-p/864116#M163039</link>
      <description>Thanks it worked&lt;BR /&gt;
Rick Keller &lt;RICK&gt; wrote in message&lt;BR /&gt;
news:7vv6ec$fhl7@adesknews2.autodesk.com...&lt;BR /&gt;
&amp;gt; Shane,&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Try David's Idea but place a  - (dash) in front of the insert command&lt;BR /&gt;
&amp;gt; "-insert".&lt;BR /&gt;
&amp;gt;  (initdia)&lt;BR /&gt;
&amp;gt;  (command "insert" "cdrev" (list 0.0 0.0) 4 "" 0)&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; hope this helps.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Rick&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Shane Christmas &lt;SCHRISTMAS&gt; wrote in message&lt;BR /&gt;
&amp;gt; news:7vut0l$dal16@adesknews2.autodesk.com...&lt;BR /&gt;
&amp;gt; &amp;gt; Thanks, but that did not work.......it simply prompts me for the INSERT&lt;BR /&gt;
&amp;gt; &amp;gt; DIALOG, I am looking for the attribute dialog box that prompts your for&lt;BR /&gt;
&amp;gt; &amp;gt; information based on the attribute. For example, if you want to&lt;BR /&gt;
attribute&lt;BR /&gt;
&amp;gt; to&lt;BR /&gt;
&amp;gt; &amp;gt; prompt you for a sheet number, instead of it prompting you at the&lt;BR /&gt;
command&lt;BR /&gt;
&amp;gt; &amp;gt; line, it would prompt you from a dialog box.&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; David Doane &lt;LECTRO-MECH&gt; wrote in message&lt;BR /&gt;
&amp;gt; &amp;gt; news:01bf2713$2b488ca0$6255d2d0@lms-1...&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; Shane,&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; Try this:&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; (initdia)&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; (command "insert" "cdrev" (list 0.0 0.0) 4 "" 0)&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; --&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; Dave D&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; (remove '-' for Email)&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; Shane Christmas &lt;SCHRISTMAS&gt; wrote in article&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;lt;7vsv7q$9aj29@adesknews2.autodesk.com&amp;gt;...&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; By the way this problem is only in Acad2000, it used to work in acad&lt;BR /&gt;
&amp;gt; R14&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; Shane Christmas &lt;SCHRISTMAS&gt; wrote in message&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; news:7vsuas$98u24@adesknews2.autodesk.com...&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; I have used a simple routine to xref in a title block, then insert&lt;BR /&gt;
&amp;gt; an&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; attribute on the title block. In R14 with attdia set to "1" the&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; attribute&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; would prompt for information via a dialog box, now it will only&lt;BR /&gt;
&amp;gt; insert&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; and&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; prompt for info via the command line, this will not work for&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; me......the&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; line of code is as follows&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; (command "insert" "cdrev" (list 0.0 0.0) 4 "" 0)&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; If you take the "0" off the end it almost works, but you have to&lt;BR /&gt;
&amp;gt; enter&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; the&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; rotation angle manually, then you get the dialog box.&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;/SCHRISTMAS&gt;&lt;/SCHRISTMAS&gt;&lt;/LECTRO-MECH&gt;&lt;/SCHRISTMAS&gt;&lt;/RICK&gt;</description>
      <pubDate>Fri, 05 Nov 1999 18:15:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/inserting-an-attribute-from-a-lisp-routine/m-p/864116#M163039</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>1999-11-05T18:15:12Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/inserting-an-attribute-from-a-lisp-routine/m-p/864117#M163040</link>
      <description>If the block is defined in your drawing, or a drawing is in your support&lt;BR /&gt;
path by the name of the block, the following will work.&lt;BR /&gt;
&lt;BR /&gt;
(defun insert-attdia (block point scale rotation / ce ad ar)&lt;BR /&gt;
  (setq&lt;BR /&gt;
    ce (getvar "cmdecho")&lt;BR /&gt;
    ad (getvar "attdia")&lt;BR /&gt;
    ar (getvar "attreq")&lt;BR /&gt;
  )&lt;BR /&gt;
  (setvar "cmdecho" 0)&lt;BR /&gt;
  (setvar "attdia" 0)&lt;BR /&gt;
  (setvar "attreq" 0)&lt;BR /&gt;
  (cond&lt;BR /&gt;
    ( (tblsearch "block" block)&lt;BR /&gt;
      (if (null point) (setq point '(0 0 0)))&lt;BR /&gt;
      (if (null scale) (setq scale 1.0))&lt;BR /&gt;
      (if (null rotation) (setq rotation 0.0))&lt;BR /&gt;
      (command ".insert" block point scale "" rotation)&lt;BR /&gt;
      (if (eq 1 (cdr (assoc 66 (entget (entlast)))))&lt;BR /&gt;
        (command ".ddatte" (entlast))&lt;BR /&gt;
      )&lt;BR /&gt;
    )&lt;BR /&gt;
    ( (setq dwg (findfile (strcat block ".dwg")))&lt;BR /&gt;
      (command ".insert" dwg)&lt;BR /&gt;
      (while (eq 1 (logand 1 (getvar "cmdactive"))) (command))&lt;BR /&gt;
      (insert-attdia block point scale rotation)&lt;BR /&gt;
    )&lt;BR /&gt;
    ( t (princ (strcat "\nError, block &amp;lt;" block "&amp;gt; not found.")))&lt;BR /&gt;
  )&lt;BR /&gt;
  (setvar "cmdecho" ce)&lt;BR /&gt;
  (setvar "attdia" ad)&lt;BR /&gt;
  (setvar "attreq" ar)&lt;BR /&gt;
  (princ)&lt;BR /&gt;
)&lt;BR /&gt;
&lt;BR /&gt;
__________________________________&lt;BR /&gt;
&lt;BR /&gt;
Michael Puckett&lt;BR /&gt;
mailto:puckettm@cadvision.com&lt;BR /&gt;
&amp;gt; Not &amp;lt; an AutoDesk classroom  monitor.&lt;BR /&gt;
Imagination makes all things possible&lt;BR /&gt;
__________________________________&lt;BR /&gt;
&lt;BR /&gt;
Shane Christmas &lt;SCHRISTMAS&gt; wrote in message&lt;BR /&gt;
news:7vv66d$fh312@adesknews2.autodesk.com...&lt;BR /&gt;
That worked, but a new issue has arose. This lisp now depends on the fact&lt;BR /&gt;
the attributed block must be defined in the drawing already, I have the&lt;BR /&gt;
search path set to the proper directory, but the block (in this case&lt;BR /&gt;
"cdrev") can not be found without first inserting the block in the drawing,&lt;BR /&gt;
then the lisp will insert the block with the attribute dialog. I really&lt;BR /&gt;
appreciate the help.....if you know how to fix this one then&lt;BR /&gt;
please.....HELP.....thanks again&lt;BR /&gt;
&lt;BR /&gt;
Michael Puckett &lt;PUCKETTM&gt; wrote in message&lt;BR /&gt;
news:7vuvpv$dam33@adesknews2.autodesk.com...&lt;BR /&gt;
&amp;gt; Doh, typo.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt;&amp;gt;&amp;gt; (setq ad (getvar "attdia") ar (getvar "attreq"))&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Making the whole thing a generic function ...&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; (defun insert-attdia (block point scale rotation / ce ad ar)&lt;BR /&gt;
&amp;gt;   (cond&lt;BR /&gt;
&amp;gt;     ( (tblsearch "block" block)&lt;BR /&gt;
&amp;gt;       (if (null point) (setq point '(0 0 0)))&lt;BR /&gt;
&amp;gt;       (if (null scale) (setq scale 1.0))&lt;BR /&gt;
&amp;gt;       (if (null rotation) (setq rotation 0.0))&lt;BR /&gt;
&amp;gt;       (setq&lt;BR /&gt;
&amp;gt;         ce (getvar "cmdecho")&lt;BR /&gt;
&amp;gt;         ad (getvar "attdia")&lt;BR /&gt;
&amp;gt;         ar (getvar "attreq")&lt;BR /&gt;
&amp;gt;       )&lt;BR /&gt;
&amp;gt;       (setvar "cmdecho" 0)&lt;BR /&gt;
&amp;gt;       (setvar "attdia" 0)&lt;BR /&gt;
&amp;gt;       (setvar "attreq" 0)&lt;BR /&gt;
&amp;gt;       (command ".insert" block point scale "" rotation)&lt;BR /&gt;
&amp;gt;       (if (eq 1 (cdr (assoc 66 (entget (entlast)))))&lt;BR /&gt;
&amp;gt;         (command ".ddatte" (entlast))&lt;BR /&gt;
&amp;gt;       )&lt;BR /&gt;
&amp;gt;       (setvar "cmdecho" ce)&lt;BR /&gt;
&amp;gt;       (setvar "attdia" ad)&lt;BR /&gt;
&amp;gt;       (setvar "attreq" ar)&lt;BR /&gt;
&amp;gt;     )&lt;BR /&gt;
&amp;gt;     ( t (princ (strcat "\nError, block &amp;lt;" block "&amp;gt; not found.")))&lt;BR /&gt;
&amp;gt;   )&lt;BR /&gt;
&amp;gt;   (princ)&lt;BR /&gt;
&amp;gt; )&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Thus, you could use as follows:&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;   (insert-attdia "cdrev" '(0 0 0) 1.0 0)&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;   (inset-attdia "cdrev" nil nil nil)&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; The latter example would resort to defaults you placed in the function; as&lt;BR /&gt;
&amp;gt; is, those would be '(0 0 0) 1.0 and 0 for the insert point, scale and&lt;BR /&gt;
&amp;gt; rotation respectively.  Obviiously you can change those to what is most&lt;BR /&gt;
&amp;gt; common for your apps.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; A strong argument for using a library based function would be that if&lt;BR /&gt;
future&lt;BR /&gt;
&amp;gt; versions of AutoCAD (should AutoDesk recover from anemic stock prices)&lt;BR /&gt;
break&lt;BR /&gt;
&amp;gt; existing code (again) all you have to do is fix the function.  Otherwise,&lt;BR /&gt;
&amp;gt; you have to scan all your programs, and edit each instance accordingly.&lt;BR /&gt;
&amp;gt; Blech.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; __________________________________&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Michael Puckett&lt;BR /&gt;
&amp;gt; mailto:puckettm@cadvision.com&lt;BR /&gt;
&amp;gt; &amp;gt; Not &amp;lt; an AutoDesk classroom  monitor.&lt;BR /&gt;
&amp;gt; Imagination makes all things possible&lt;BR /&gt;
&amp;gt; __________________________________&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Michael Puckett &lt;PUCKETTM&gt; wrote in message&lt;BR /&gt;
&amp;gt; news:7vutt2$d8p15@adesknews2.autodesk.com...&lt;BR /&gt;
&amp;gt; Try this, should work in r12 - a2k:&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; (setq ad (getvar "attdia")) ar (getvar "attreq"))&lt;BR /&gt;
&amp;gt; (setvar "attdia" 0)&lt;BR /&gt;
&amp;gt; (setvar "attreq" 0)&lt;BR /&gt;
&amp;gt; (command ".insert" "cdrev" (list 0.0 0.0) 4.0 "" 0.0)&lt;BR /&gt;
&amp;gt; (if (eq 1 (cdr (assoc 66 (entget (entlast)))))&lt;BR /&gt;
&amp;gt;   (command ".ddatte" (entlast))&lt;BR /&gt;
&amp;gt; )&lt;BR /&gt;
&amp;gt; (setvar "attdia" ad)&lt;BR /&gt;
&amp;gt; (setvar "attreq" ar)&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; __________________________________&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Michael Puckett&lt;BR /&gt;
&amp;gt; mailto:puckettm@cadvision.com&lt;BR /&gt;
&amp;gt; &amp;gt; Not &amp;lt; an AutoDesk classroom  monitor.&lt;BR /&gt;
&amp;gt; Imagination makes all things possible&lt;BR /&gt;
&amp;gt; __________________________________&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Shane Christmas &lt;SCHRISTMAS&gt; wrote in message&lt;BR /&gt;
&amp;gt; news:7vut0l$dal16@adesknews2.autodesk.com...&lt;BR /&gt;
&amp;gt; Thanks, but that did not work.......it simply prompts me for the INSERT&lt;BR /&gt;
&amp;gt; DIALOG, I am looking for the attribute dialog box that prompts your for&lt;BR /&gt;
&amp;gt; information based on the attribute. For example, if you want to attribute&lt;BR /&gt;
to&lt;BR /&gt;
&amp;gt; prompt you for a sheet number, instead of it prompting you at the command&lt;BR /&gt;
&amp;gt; line, it would prompt you from a dialog box.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; David Doane &lt;LECTRO-MECH&gt; wrote in message&lt;BR /&gt;
&amp;gt; news:01bf2713$2b488ca0$6255d2d0@lms-1...&lt;BR /&gt;
&amp;gt; &amp;gt; Shane,&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; Try this:&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; (initdia)&lt;BR /&gt;
&amp;gt; &amp;gt; (command "insert" "cdrev" (list 0.0 0.0) 4 "" 0)&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; --&lt;BR /&gt;
&amp;gt; &amp;gt; Dave D&lt;BR /&gt;
&amp;gt; &amp;gt; (remove '-' for Email)&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; Shane Christmas &lt;SCHRISTMAS&gt; wrote in article&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;lt;7vsv7q$9aj29@adesknews2.autodesk.com&amp;gt;...&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; By the way this problem is only in Acad2000, it used to work in acad&lt;BR /&gt;
R14&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; Shane Christmas &lt;SCHRISTMAS&gt; wrote in message&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; news:7vsuas$98u24@adesknews2.autodesk.com...&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; I have used a simple routine to xref in a title block, then insert&lt;BR /&gt;
an&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; attribute on the title block. In R14 with attdia set to "1" the&lt;BR /&gt;
&amp;gt; &amp;gt; attribute&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; would prompt for information via a dialog box, now it will only&lt;BR /&gt;
insert&lt;BR /&gt;
&amp;gt; &amp;gt; and&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; prompt for info via the command line, this will not work for&lt;BR /&gt;
&amp;gt; &amp;gt; me......the&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; line of code is as follows&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; (command "insert" "cdrev" (list 0.0 0.0) 4 "" 0)&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; If you take the "0" off the end it almost works, but you have to&lt;BR /&gt;
enter&lt;BR /&gt;
&amp;gt; &amp;gt; the&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; rotation angle manually, then you get the dialog box.&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;/SCHRISTMAS&gt;&lt;/SCHRISTMAS&gt;&lt;/LECTRO-MECH&gt;&lt;/SCHRISTMAS&gt;&lt;/PUCKETTM&gt;&lt;/PUCKETTM&gt;&lt;/SCHRISTMAS&gt;</description>
      <pubDate>Fri, 05 Nov 1999 18:20:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/inserting-an-attribute-from-a-lisp-routine/m-p/864117#M163040</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>1999-11-05T18:20:44Z</dc:date>
    </item>
    <item>
      <title>Re: Inserting an attribute from a lisp routine</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/inserting-an-attribute-from-a-lisp-routine/m-p/864118#M163041</link>
      <description>On Thu, 4 Nov 1999 16:35:41 -0500, "Shane Christmas" &lt;SCHRISTMAS&gt; wrote:&lt;BR /&gt;
&lt;BR /&gt;
&amp;gt;I have used a simple routine to xref in a title block, then insert an&lt;BR /&gt;
&amp;gt;attribute on the title block. In R14 with attdia set to "1" the attribute&lt;BR /&gt;
&amp;gt;would prompt for information via a dialog box, now it will only insert and&lt;BR /&gt;
&amp;gt;prompt for info via the command line, this will not work for me......the&lt;BR /&gt;
&amp;gt;line of code is as follows&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;(command "insert" "cdrev" (list 0.0 0.0) 4 "" 0)&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;If you take the "0" off the end it almost works, but you have to enter the&lt;BR /&gt;
&amp;gt;rotation angle manually, then you get the dialog box.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&lt;BR /&gt;
A few things that may help you in the future.&lt;BR /&gt;
&lt;BR /&gt;
1. Make sure you know the Setvars associated with the task you intend to do.&lt;BR /&gt;
&lt;BR /&gt;
2. Run the "command" you want to program from AutoCAD's command line.&lt;BR /&gt;
  Document the inputs and their order.&lt;BR /&gt;
 Remember, the value of some Setvars or other parameters could change the &lt;BR /&gt;
&lt;BR /&gt;
3.  When you write your code,  example: (command "insert" "cdrev" (list 0.0 0.0) 4 "" 0)&lt;BR /&gt;
Make sure you handle all exceptions prior to the "command" statement.&lt;BR /&gt;
&lt;BR /&gt;
Cheers,&lt;BR /&gt;
Lu  &lt;BR /&gt;
;-----------------------------------------------------------------------&lt;BR /&gt;
; When all else fails, read the book.  But there ain't none no more! &lt;G&gt; &lt;BR /&gt;
;   CAD-Tek web site:  http://www.cad-tek.com&lt;BR /&gt;
;-----------------------------------------------------------------------&lt;/G&gt;&lt;/SCHRISTMAS&gt;</description>
      <pubDate>Sun, 07 Nov 1999 15:01:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/inserting-an-attribute-from-a-lisp-routine/m-p/864118#M163041</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>1999-11-07T15:01:04Z</dc:date>
    </item>
  </channel>
</rss>

