<?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 Betreff: RTEXT DRAWING NAME in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/rtext-drawing-name/m-p/9187636#M87162</link>
    <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/71745"&gt;@cadffm&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope you don't mind I tried using your string in order to have the filename displayed on our drawing border in Layout.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Our filenames are in the style 12345-AX-A.dwg. I used your string in FIELDS and manged to edit it to remove the last 6 characters (the -A is an issue letter which we don't want displaying on our drawing number as the issue letter is displayed elsewhere) so it read 12345-AX. It's important that the characters are removed from the right as the filename could be longer (eg 12345-XX-AX-A)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Going back to the issue letter, the -A part of the filename, is it possible to create a DIESEL string that will only show the letter ie A. I would like to be able to make our issue letter a FIELD so that when the filename becomes, say 12345-AX-B.dwg the Issue letter only is displayed as B.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
    <pubDate>Fri, 06 Dec 2019 17:09:59 GMT</pubDate>
    <dc:creator>dpalmerVQ54W</dc:creator>
    <dc:date>2019-12-06T17:09:59Z</dc:date>
    <item>
      <title>RTEXT DRAWING NAME</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/rtext-drawing-name/m-p/8873075#M87158</link>
      <description>&lt;P&gt;Good day,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anyone help me to remove the file name extension when I use $(getvar,dwgname)?&lt;/P&gt;&lt;P&gt;My file names are written like this: "M-03 AIRCONDITIONING SYSTEM LAYOUT"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;when I use the $(getvar,dwgname) the text appearing was like this&lt;/P&gt;&lt;P&gt;"M-03 AIRCONDITIONING SYSTEM LAYOUT.dwg"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to remove the file name extension (.dwg)&lt;/P&gt;&lt;P&gt;But I don't know what code to use.. Please help me..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jun 2019 10:39:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/rtext-drawing-name/m-p/8873075#M87158</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-06-26T10:39:44Z</dc:date>
    </item>
    <item>
      <title>Betreff: RTEXT DRAWING NAME</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/rtext-drawing-name/m-p/8873085#M87159</link>
      <description>&lt;P&gt;use SUBSTR to cut the string from the 1 to the 'length of string - 4 characters)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;$(substr,$(getvar,DWGNAME),1,$(-,$(strlen,$(getvar,DWGNAME)),4))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;$(substr, ; cut&lt;/P&gt;
&lt;P&gt;$(getvar,DWGNAME), ; dwgname+ext&lt;/P&gt;
&lt;P&gt;1, ; from 1 character to&lt;/P&gt;
&lt;P&gt;$(-,$(strlen,$(getvar,DWGNAME)), 4) ; length of dwgname+ext, minus 4&lt;/P&gt;
&lt;P&gt;)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But sind 2005 i would never use RTEXT for this,&lt;A href="http://help.autodesk.com/view/ACD/2020/ENU/?guid=GUID-1B6DD22B-10D1-44ED-BAA2-E6D79FE52327" target="_blank" rel="noopener"&gt;&lt;STRONG&gt; use a FIELD&lt;/STRONG&gt;&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jun 2019 10:46:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/rtext-drawing-name/m-p/8873085#M87159</guid>
      <dc:creator>cadffm</dc:creator>
      <dc:date>2019-06-26T10:46:56Z</dc:date>
    </item>
    <item>
      <title>Betreff: RTEXT DRAWING NAME</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/rtext-drawing-name/m-p/8873114#M87160</link>
      <description>&lt;P&gt;The command you have provided was effective.. Thank you very much! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But in addition, can I have another code for the same subject matter but this time, I want to substract also the first 5 characters of the file name..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;my file name was "M-03 AIRCONDITIONING SYSTEM LAYOUT"&lt;/P&gt;&lt;P&gt;my output should be "AIRCONDITIONING SYSTEM LAYOUT" only..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;everytime I try editing the code you have provided, it always appear as getvar error..&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jun 2019 10:58:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/rtext-drawing-name/m-p/8873114#M87160</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-06-26T10:58:03Z</dc:date>
    </item>
    <item>
      <title>Betreff: RTEXT DRAWING NAME</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/rtext-drawing-name/m-p/8873140#M87161</link>
      <description>&lt;P&gt;&lt;A href="http://help.autodesk.com/view/ACD/2020/ENU/?guid=GUID-F94A885A-4DA2-432B-AC1A-EB49CC6C1C72" target="_blank" rel="noopener"&gt;Try to edit this sample to learn how SUBSTR works&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://help.autodesk.com/view/ACD/2020/ENU/?guid=GUID-F94A885A-4DA2-432B-AC1A-EB49CC6C1C72" target="_blank" rel="noopener"&gt;$(substr,ROGERRABBIT,6,99)&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jun 2019 11:13:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/rtext-drawing-name/m-p/8873140#M87161</guid>
      <dc:creator>cadffm</dc:creator>
      <dc:date>2019-06-26T11:13:51Z</dc:date>
    </item>
    <item>
      <title>Betreff: RTEXT DRAWING NAME</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/rtext-drawing-name/m-p/9187636#M87162</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/71745"&gt;@cadffm&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope you don't mind I tried using your string in order to have the filename displayed on our drawing border in Layout.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Our filenames are in the style 12345-AX-A.dwg. I used your string in FIELDS and manged to edit it to remove the last 6 characters (the -A is an issue letter which we don't want displaying on our drawing number as the issue letter is displayed elsewhere) so it read 12345-AX. It's important that the characters are removed from the right as the filename could be longer (eg 12345-XX-AX-A)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Going back to the issue letter, the -A part of the filename, is it possible to create a DIESEL string that will only show the letter ie A. I would like to be able to make our issue letter a FIELD so that when the filename becomes, say 12345-AX-B.dwg the Issue letter only is displayed as B.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Dec 2019 17:09:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/rtext-drawing-name/m-p/9187636#M87162</guid>
      <dc:creator>dpalmerVQ54W</dc:creator>
      <dc:date>2019-12-06T17:09:59Z</dc:date>
    </item>
    <item>
      <title>Betreff: RTEXT DRAWING NAME</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/rtext-drawing-name/m-p/9188038#M87163</link>
      <description>&lt;P&gt;Put the drawing name without path or extension into a variable:&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000FF"&gt;(setq &lt;STRONG&gt;str&lt;/STRONG&gt; (vl-filename-base (getvar 'dwgname)))&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To get the parts you're after, use the fact that the &lt;FONT color="#000000"&gt;(vl-string-position)&lt;/FONT&gt; function lets you search &lt;FONT color="#FF00FF"&gt;&lt;EM&gt;from the end&lt;/EM&gt;&lt;/FONT&gt;, so you can find the position of the &lt;EM&gt;last&lt;/EM&gt;&amp;nbsp; hyphen, no matter how many hyphens there are.&amp;nbsp; So if that drawing name is&amp;nbsp;&lt;FONT color="#000000"&gt;"&lt;STRONG&gt;12345-AX-A&lt;/STRONG&gt;"&lt;/FONT&gt;:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For everything &lt;EM&gt;except&lt;/EM&gt;&amp;nbsp; the hyphen and issue letter at the end:&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000FF"&gt;(substr str 1 (vl-string-position 45 str 1 &lt;STRONG&gt;&lt;FONT color="#FF00FF"&gt;T&lt;/FONT&gt;&lt;/STRONG&gt;))&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;returns&lt;BR /&gt;&lt;FONT color="#000000"&gt;"&lt;STRONG&gt;12345-AX&lt;/STRONG&gt;"&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;[&lt;FONT color="#0000FF"&gt;45&lt;/FONT&gt; is the ASCII character number for a hyphen.]&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For the issue letter at the end only:&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;(substr str (+ (vl-string-position 45 str 1 &lt;STRONG&gt;&lt;FONT color="#FF00FF"&gt;T&lt;/FONT&gt;&lt;/STRONG&gt;) 2))&lt;/FONT&gt;&lt;BR /&gt;returns&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;"&lt;STRONG&gt;A&lt;/STRONG&gt;"&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Dec 2019 20:00:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/rtext-drawing-name/m-p/9188038#M87163</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2019-12-06T20:00:04Z</dc:date>
    </item>
    <item>
      <title>Betreff: RTEXT DRAWING NAME</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/rtext-drawing-name/m-p/9190420#M87164</link>
      <description>Thanks Kent. I'll give it a try and report back.</description>
      <pubDate>Mon, 09 Dec 2019 08:34:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/rtext-drawing-name/m-p/9190420#M87164</guid>
      <dc:creator>dpalmerVQ54W</dc:creator>
      <dc:date>2019-12-09T08:34:58Z</dc:date>
    </item>
    <item>
      <title>Betreff: RTEXT DRAWING NAME</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/rtext-drawing-name/m-p/11982553#M87165</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I need 2 spaces for each letter of file name. Is it possible? our dwg No. are in separate boxes. so...&lt;/P&gt;</description>
      <pubDate>Tue, 23 May 2023 11:28:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/rtext-drawing-name/m-p/11982553#M87165</guid>
      <dc:creator>SPARKSURESH_G</dc:creator>
      <dc:date>2023-05-23T11:28:21Z</dc:date>
    </item>
    <item>
      <title>Betreff: RTEXT DRAWING NAME</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/rtext-drawing-name/m-p/11984202#M87166</link>
      <description>&lt;P&gt;Need a sample of the file name before and after else just guessing what you want.&lt;/P&gt;</description>
      <pubDate>Tue, 23 May 2023 23:41:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/rtext-drawing-name/m-p/11984202#M87166</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2023-05-23T23:41:53Z</dc:date>
    </item>
  </channel>
</rss>

