<?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: Moving Dimension Text in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/moving-dimension-text/m-p/7233350#M117700</link>
    <description>&lt;P&gt;Another possibility [I haven't experimented] -- (entmod) on the entity data list, &lt;EM&gt;followed by &lt;/EM&gt;&lt;STRONG&gt;(entupd)&lt;/STRONG&gt;&lt;EM&gt; on the entity name&lt;/EM&gt;.&lt;/P&gt;</description>
    <pubDate>Mon, 17 Jul 2017 17:34:06 GMT</pubDate>
    <dc:creator>Kent1Cooper</dc:creator>
    <dc:date>2017-07-17T17:34:06Z</dc:date>
    <item>
      <title>Moving Dimension Text</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/moving-dimension-text/m-p/7229720#M117689</link>
      <description>&lt;P&gt;So I can't figure out why this doesn't work:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;First you create a new dimension....then:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(setq NewDim (entget (ssname (ssget "l") 0))) ; get newly created dim&lt;BR /&gt;(setq TextPosition (assoc '11 NewDim)) ; get the text position of the dim text&lt;BR /&gt;(setq NewTextPosition (subst (- (nth 1 TextPosition) TextOffset) (nth 1 TextPosition) TextPosition)) ; offset the X coordinate of the dim text&lt;BR /&gt;(setq NewDim (subst NewTextPosition TextPosition NewDim)) ;substituting the new text position in for the old&lt;BR /&gt;(entmod NewDim) ; modifying the entity&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Everything looks great....but the entity doesn't actually get modified......please help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jul 2017 23:05:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/moving-dimension-text/m-p/7229720#M117689</guid>
      <dc:creator>PFHeller</dc:creator>
      <dc:date>2017-07-14T23:05:24Z</dc:date>
    </item>
    <item>
      <title>Re: Moving Dimension Text</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/moving-dimension-text/m-p/7229737#M117690</link>
      <description>&lt;P&gt;This works for me&lt;/P&gt;
&lt;PRE&gt;(setq NewDim (entget (ssname (ssget "l") 0)))
(setq TextPosition (assoc 11 NewDim))
(setq NewTextPosition (subst (- (nth 1 TextPosition) TextOffset) (nth 1 TextPosition) TextPosition))
(setq NewDim (subst NewTextPosition TextPosition NewDim)) 
(entmod NewDim)&lt;/PRE&gt;
&lt;P&gt;&lt;STRONG&gt;'11 &lt;/STRONG&gt;is&amp;nbsp;the problem&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jul 2017 23:26:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/moving-dimension-text/m-p/7229737#M117690</guid>
      <dc:creator>Ranjit_Singh</dc:creator>
      <dc:date>2017-07-14T23:26:48Z</dc:date>
    </item>
    <item>
      <title>Re: Moving Dimension Text</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/moving-dimension-text/m-p/7229739#M117691</link>
      <description>&lt;P&gt;Just off the top of my head [without experimenting]:&amp;nbsp; I haven't seen&amp;nbsp;an &lt;EM&gt;apostrophe&lt;/EM&gt; used before the association-code number -- try just&amp;nbsp;(assoc 11 NewDim).&amp;nbsp; It may work as well with the apostrophe, but it's not needed [I never use it].&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If that doesn't do it, can you run each function along the way separately, and see where it doesn't return what you expect?&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jul 2017 23:27:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/moving-dimension-text/m-p/7229739#M117691</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2017-07-14T23:27:57Z</dc:date>
    </item>
    <item>
      <title>Re: Moving Dimension Text</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/moving-dimension-text/m-p/7229807#M117692</link>
      <description>&lt;P&gt;Once I set the value of TextOffset, it works for me in 2002. &amp;nbsp;But if the value of TextOffset is small, you may not notice the shift. &amp;nbsp;In the DWG of the giant yacht that&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/291579"&gt;@braudpat&lt;/a&gt;&amp;nbsp;sent me. I had to set TextOffset to 1000 to see it get shifted.&lt;/P&gt;
&lt;P&gt;Other things to consider are the other dimension variables/properties that might keep the text position fixed relative to the dimension, you know... dimthis, dimthat, and dimwit.&lt;/P&gt;</description>
      <pubDate>Sat, 15 Jul 2017 01:12:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/moving-dimension-text/m-p/7229807#M117692</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2017-07-15T01:12:13Z</dc:date>
    </item>
    <item>
      <title>Re: Moving Dimension Text</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/moving-dimension-text/m-p/7229811#M117693</link>
      <description>&lt;P&gt;BTW, I did find it odd that you minused, er subtracted, the TextOffset value, such that a positive value shifted the text to the left (lower X) rather than to the right. &amp;nbsp;Maybe you want to change that - to a +.&lt;/P&gt;</description>
      <pubDate>Sat, 15 Jul 2017 01:25:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/moving-dimension-text/m-p/7229811#M117693</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2017-07-15T01:25:23Z</dc:date>
    </item>
    <item>
      <title>Re: Moving Dimension Text</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/moving-dimension-text/m-p/7230639#M117694</link>
      <description>&lt;P&gt;Thanks so much all you guys for the help! I'll give your suggestions a try when I get back to work on Monday and mark a solution. You're the best!&lt;/P&gt;</description>
      <pubDate>Sat, 15 Jul 2017 21:19:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/moving-dimension-text/m-p/7230639#M117694</guid>
      <dc:creator>PFHeller</dc:creator>
      <dc:date>2017-07-15T21:19:08Z</dc:date>
    </item>
    <item>
      <title>Re: Moving Dimension Text</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/moving-dimension-text/m-p/7233132#M117695</link>
      <description>&lt;P&gt;I tried removing the '.....no dice....everything checks out until I get to the (entmod NewDim).......nothing happens! So frustrating. When I reselect the dimension....the text position is still in the same spot.&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jul 2017 16:28:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/moving-dimension-text/m-p/7233132#M117695</guid>
      <dc:creator>PFHeller</dc:creator>
      <dc:date>2017-07-17T16:28:36Z</dc:date>
    </item>
    <item>
      <title>Re: Moving Dimension Text</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/moving-dimension-text/m-p/7233236#M117696</link>
      <description>&lt;P&gt;I am baffled.&amp;nbsp; It worked for me at home with 2002, but not here at work with C3D 2010.&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jul 2017 17:02:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/moving-dimension-text/m-p/7233236#M117696</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2017-07-17T17:02:37Z</dc:date>
    </item>
    <item>
      <title>Re: Moving Dimension Text</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/moving-dimension-text/m-p/7233277#M117697</link>
      <description>&lt;P&gt;From what i can see, this is a part of a bigger program.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your snippet did not work in 2018 as well.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Its easy with vla-method though (vlax-put itm 'TextPosition (cdr NewTextPosition)) but that is not your question isn't it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Maybe a workaround?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;(setq NewTextPosition nil  dim (car (entsel)))
(setq dimdata (tblobjname "BLOCK" (cdr (assoc 2 (entget dim)))))
(setq TextOffset 150.00);; &amp;lt;- for example

(while (and (setq dimdata (entnext dimdata)) (not NewTextPosition))
      (if (eq "MTEXT" (cdr (assoc 0 (setq mtextdata (entget dimdata)))))
          (progn
                (setq TextPosition (assoc 10 mtextdata))
                (setq NewTextPosition (subst
                            (- (nth 1 TextPosition) TextOffset) (nth 1 TextPosition) TextPosition))
                
          (entmod (subst NewTextPosition TextPosition mtextdata))
	    		)
		)	
	)&lt;/PRE&gt;
&lt;P&gt;Requires a REGEN&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;HTH&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jul 2017 17:14:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/moving-dimension-text/m-p/7233277#M117697</guid>
      <dc:creator>pbejse</dc:creator>
      <dc:date>2017-07-17T17:14:22Z</dc:date>
    </item>
    <item>
      <title>Re: Moving Dimension Text</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/moving-dimension-text/m-p/7233280#M117698</link>
      <description>&lt;P&gt;Don't be insulted if I ask the stupid but obvious question:&amp;nbsp; Is there actually a value set in the TextOffset variable?&amp;nbsp; [It's not set in the posted code, so....]&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jul 2017 17:14:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/moving-dimension-text/m-p/7233280#M117698</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2017-07-17T17:14:58Z</dc:date>
    </item>
    <item>
      <title>Re: Moving Dimension Text</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/moving-dimension-text/m-p/7233318#M117699</link>
      <description>&lt;P&gt;Okay.&amp;nbsp; Seems as though entmod isn't strong enough.&lt;/P&gt;
&lt;P&gt;But if you convert the entity name into a vla-object it will work...&lt;/P&gt;
&lt;PRE&gt;;; First draw the dimension, then...
(setq textoffset (getdist "\nText offset: "))
(vl-load-com)
(setq e (entlast))
(setq obj (vlax-ename-&amp;gt;vla-object e))
(setq tp (vlax-get obj 'textposition))
(setq tp (mapcar '+ tp (list textoffset 0 0)))
(vlax-put obj 'textposition tp)
(princ "\nBada Bing")&lt;/PRE&gt;</description>
      <pubDate>Mon, 17 Jul 2017 17:26:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/moving-dimension-text/m-p/7233318#M117699</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2017-07-17T17:26:52Z</dc:date>
    </item>
    <item>
      <title>Re: Moving Dimension Text</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/moving-dimension-text/m-p/7233350#M117700</link>
      <description>&lt;P&gt;Another possibility [I haven't experimented] -- (entmod) on the entity data list, &lt;EM&gt;followed by &lt;/EM&gt;&lt;STRONG&gt;(entupd)&lt;/STRONG&gt;&lt;EM&gt; on the entity name&lt;/EM&gt;.&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jul 2017 17:34:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/moving-dimension-text/m-p/7233350#M117700</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2017-07-17T17:34:06Z</dc:date>
    </item>
    <item>
      <title>Re: Moving Dimension Text</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/moving-dimension-text/m-p/7233583#M117701</link>
      <description>&lt;P&gt;This worked perfectly! You're the man...thanks!&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3930636"&gt;@john.uhden&lt;/a&gt; wrote:&lt;BR /&gt;&lt;P&gt;Okay.&amp;nbsp; Seems as though entmod isn't strong enough.&lt;/P&gt;&lt;P&gt;But if you convert the entity name into a vla-object it will work...&lt;/P&gt;&lt;PRE&gt;;; First draw the dimension, then...
(setq textoffset (getdist "\nText offset: "))
(vl-load-com)
(setq e (entlast))
(setq obj (vlax-ename-&amp;gt;vla-object e))
(setq tp (vlax-get obj 'textposition))
(setq tp (mapcar '+ tp (list textoffset 0 0)))
(vlax-put obj 'textposition tp)
(princ "\nBada Bing")&lt;/PRE&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jul 2017 18:54:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/moving-dimension-text/m-p/7233583#M117701</guid>
      <dc:creator>PFHeller</dc:creator>
      <dc:date>2017-07-17T18:54:56Z</dc:date>
    </item>
    <item>
      <title>Re: Moving Dimension Text</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/moving-dimension-text/m-p/7233593#M117702</link>
      <description>&lt;P&gt;Oh by the way....I figured out why it wasn't working to begin with......because 11 is not the text position....it is actually the extension line position. And you can't just modify one of those you have to do both because they go together.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Just using the old entget I couldn't find the textposition.....so your way is great. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jul 2017 18:57:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/moving-dimension-text/m-p/7233593#M117702</guid>
      <dc:creator>PFHeller</dc:creator>
      <dc:date>2017-07-17T18:57:16Z</dc:date>
    </item>
    <item>
      <title>Re: Moving Dimension Text</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/moving-dimension-text/m-p/7233663#M117703</link>
      <description>&lt;P&gt;Good!&amp;nbsp; If it is really working for you, please click "Accept Solution."&amp;nbsp; &lt;EM&gt;(not to this response, but the earlier one)&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;When you find the correct DXF code, you ought to try the entmod method again just to see if it works that way.&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jul 2017 19:23:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/moving-dimension-text/m-p/7233663#M117703</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2017-07-17T19:23:30Z</dc:date>
    </item>
  </channel>
</rss>

