<?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: Auto Number Block Page Number in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/auto-number-block-page-number/m-p/8273265#M99600</link>
    <description>&lt;PRE&gt;&amp;nbsp;&lt;/PRE&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5351025"&gt;@LoganAC34&lt;/a&gt;&amp;nbsp;wrote:Its just how my company does it. Once the page numbers get to 10 they stop having "0" before them ("09", "10", "11"). Ideally I would like to have the elevation markers not have the "0" before the number, so just &lt;SPAN&gt;"1" "2" "3"&lt;/SPAN&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try this&lt;/P&gt;
&lt;PRE&gt;(defun c:ANBPN	 (/ _AttFunc _DPfunc  data     _remspace
                   Tblock   emarker  eTag     ss       i
                   e        efname   bp       f        at_TB
                   a        TagIsInsde        eString
                  )

;;;					pBe Sep 2018					;;;
;;;			Auto Number Block Page Number  			;;;
  
(defun _AttFunc (en / a v)
  (mapcar (function
            (lambda (at)
              (list (vla-get-tagstring at) (vla-get-textstring at) at))
              
            )
          (vlax-invoke en 'Getattributes)
  )
)
(Defun _DPfunc (en nm)
  	(vl-some '(lambda (d)
                 (if (eq (vlax-get d 'PropertyName) nm) (vlax-get d 'Value)))
					(Vlax-invoke en 'GetDynamicBlockProperties)
              )
  )
(defun _remspace (str)
  	(foreach func '(vl-string-right-trim vl-string-left-trim)
       	(setq str ((Eval func)  " " str)))
  )
	

(setq data '( "ELEVATION MARKER" "TITLE BLOCK" "ELEVATION TAG AA-ZZ" "ELEVATION TAG"))
  (if
    (setq Tblock nil emarker nil  eTag nil TagIsInsde nil
		ss (ssget (list
						'(-4 . "&amp;lt;OR")
						'(-4 . "&amp;lt;AND")
                              '(0 . "INSERT") (cons 2  (apply 'strcat 
					    						(mapcar '(lambda (a)(strcat   a "," ))
					                                      (cons "`*U*" data))))
                              '(-4 . "AND&amp;gt;")
                              '(-4 . "&amp;lt;AND")
                              '(0 . "TEXT")'(1 . "%%U Elevation *")'(8 . "TITLES")                              
	 					'(-4 . "AND&amp;gt;")
	 					'(-4 . "OR&amp;gt;")
                              )
                    )
          )
    (progn
	      (repeat (setq i (sslength ss))
			(setq e (vlax-ename-&amp;gt;vla-object (ssname ss (Setq i (1- i)))))			
	        		
				(Cond
						(	(eq  (vla-get-objectname e) "AcDbText")
                               		(setq eString (Vla-get-textstring e))
                               		(setq p (vl-string-search "Elevation " eString ))
                               			(setq eTag (Cons  (list
                                                                 (_remspace (substr eString  (+ 10 p))) e) eTag))
                               				)
                      		(	(eq (car data) (setq efname  (strcase (vla-get-effectivename e))))
                                			(setq att_data (_AttFunc e ))
			                           		(setq emarker (Cons
			                                                      (list (cadr (assoc "ELEVATION_LETTER." att_data))
                                                                           (caddr (assoc "ELEVATION_PAGE_NO." att_data)))	
                                                                            emarker))
			                            		)
			        		 (	(eq (cadr data) efname)(vla-GetBoundingBox e 'll 'ur)
			                           		(setq Tblock (Cons
			                                                      (list (cadr
                                                                             (assoc "SHT-NO." (_AttFunc e )))
			                                                            (mapcar 'vlax-safearray-&amp;gt;list (list ll ur))) Tblock))
			                            		)
						 (	(member  efname (cddr data))
	                           			(if (setq v (_DPfunc e "Elevation"))
			                           		(setq eTag (Cons  (list v e) eTag)))
	                           				)
	                 )
	        )
      	(if
            (and emarker Tblock efname
                 	(foreach tag eTag
                      	(Setq bp (vlax-get (cadr tag) 'Insertionpoint))
                 		(if (setq f  (vl-some '(lambda (tb)
								(setq l (caadr tb) u (cadadr tb))
									(if (and (&amp;lt; (car l)  (Car bp)  (car u))
										    (&amp;lt; (cadr l) (Cadr bp) (cadr u))) (Car tb)))	
															Tblock))
                           	(setq TagIsInsde (cons
                                                 (cons (car tag) f) TagIsInsde))
                           )
                      TagIsInsde
                      )
                 )
            
                 	(while (setq a (Car emarker))
                      (if (setq at_TB (Cdr (assoc (car a) TagIsInsde)))
                        (vla-put-textstring (cadr a) (itoa (Atoi at_TB)))
                      )
                      (setq emarker (Cdr emarker))
                    )
                 )
			)
		    )
		(princ)
		  )&lt;/PRE&gt;
&lt;P&gt;HTH&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 17 Sep 2018 16:52:42 GMT</pubDate>
    <dc:creator>pbejse</dc:creator>
    <dc:date>2018-09-17T16:52:42Z</dc:date>
    <item>
      <title>Auto Number Block Page Number</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/auto-number-block-page-number/m-p/8265650#M99593</link>
      <description>&lt;P&gt;Currently the way my company drafts is purely in model space. We have an elevation block that we place in plan and elevation views and then change two attributes, elevation letter and page number. It gets really tedious changing all the page numbers on all the elevation markers since you sometimes have 3 for each elevation (one on plan view, one or adjacent elevations).&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;This might be tricky, but my idea is to have a lisp that changes the page number attribute on the elevation marker to the page number the elevation tag is on, which isn't in the same page most of the time.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;There are four different blocks that this lisp would reference; Elevation marker, elevation tag, elevation tag AA-ZZ, and title block. If possible i would like to also reference a specific style of text.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;The way i'm thinking lisp would work is it would prompt the user to select all of the title blocks containing the plan and elevation views. The lisp would then look for all of the elevation tags (and specific style of text) and keep a list of what elevation letter is on what title block page number. It would then search for the corresponding elevation marker and change the page number attribute to match the corresponding title block page number that the elevation tag is on.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;The requirements for the lisp to work properly would be that every elevation tag and marker has to be placed and have the correct elevation letter typed in, they would all have to be placed in title blocks, and all the title blocks have to be numbered. A few problems I see with this that could mess it up is if there are two of the same elevation tags, there are no elevation markers to match to a elevation tag or two title blocks with the same page number. For this i would just like an error message saying something like 'there are duplicate page number(s)/elevation letter(s)', and if its not too much to ask to list the page numbers or elevation letters. A few other problems i see with coding is we scale up or down our title blocks to fit the content that is inside, just being able to identify what title block the elevation tag is on, and identifying what is an elevation letter since it could be just text with some custom elevation letter like 1.A or AB.1, or 1A, etc.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've attached a file that has the blocks and text and an expample. Thanks.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Sep 2018 12:53:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/auto-number-block-page-number/m-p/8265650#M99593</guid>
      <dc:creator>LoganAC34</dc:creator>
      <dc:date>2018-09-13T12:53:21Z</dc:date>
    </item>
    <item>
      <title>Re: Auto Number Block Page Number</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/auto-number-block-page-number/m-p/8266984#M99594</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5351025"&gt;@LoganAC34&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
......
&lt;P&gt;The way i'm thinking lisp would work is it would prompt the user to select all of the title block......&amp;nbsp; letter like 1.A or AB.1, or 1A, etc.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've attached a file that has the blocks and text and an expample. Thanks.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Not sure I completely understand the requirement. I can't tell the difference between the top [ This ] and the one at the bottom [ the other this ] or is it just me?&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;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Sep 2018 20:59:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/auto-number-block-page-number/m-p/8266984#M99594</guid>
      <dc:creator>pbejse</dc:creator>
      <dc:date>2018-09-13T20:59:33Z</dc:date>
    </item>
    <item>
      <title>Re: Auto Number Block Page Number</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/auto-number-block-page-number/m-p/8268314#M99595</link>
      <description>&lt;P&gt;Woops. The elevation markers in the first "this" is supposed to have pound signs in "Elevation_Pg_no." attribute.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Sep 2018 12:06:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/auto-number-block-page-number/m-p/8268314#M99595</guid>
      <dc:creator>LoganAC34</dc:creator>
      <dc:date>2018-09-14T12:06:13Z</dc:date>
    </item>
    <item>
      <title>Re: Auto Number Block Page Number</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/auto-number-block-page-number/m-p/8268341#M99596</link>
      <description>&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;I do not understand this example.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Can you make only two - one title block as is, and another as needed.&lt;/SPAN&gt;&lt;BR /&gt;Show arrows what and where should be written.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Sep 2018 12:13:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/auto-number-block-page-number/m-p/8268341#M99596</guid>
      <dc:creator>maratovich</dc:creator>
      <dc:date>2018-09-14T12:13:46Z</dc:date>
    </item>
    <item>
      <title>Re: Auto Number Block Page Number</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/auto-number-block-page-number/m-p/8268524#M99597</link>
      <description>&lt;P&gt;The best example would be 6 title blocks (3 on top, 3 on bottom) since it has to do with the page numbering. Attached is a new file that&amp;nbsp;show arrows describing what should happen. Sorry for the confusion. Basically the whole idea of the lisp is to auto number the elevation marker with the proper page number.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Sep 2018 13:10:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/auto-number-block-page-number/m-p/8268524#M99597</guid>
      <dc:creator>LoganAC34</dc:creator>
      <dc:date>2018-09-14T13:10:39Z</dc:date>
    </item>
    <item>
      <title>Re: Auto Number Block Page Number</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/auto-number-block-page-number/m-p/8269878#M99598</link>
      <description>&lt;P&gt;Why is it that the title blocks are numbered "01" "02" "03" but Elevation markers are "1" "2" "3"&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Tell us now&lt;/STRONG&gt; If you're planning to change the TEXT elevation tag to a block before I post the code.&lt;/P&gt;
&lt;P&gt;&amp;lt; excluding TEXT elevation tag &amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://autode.sk/2xaAa3O" target="_blank"&gt;https://autode.sk/2xaAa3O&lt;/A&gt; &amp;lt;--- look here&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 15 Sep 2018 06:46:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/auto-number-block-page-number/m-p/8269878#M99598</guid>
      <dc:creator>pbejse</dc:creator>
      <dc:date>2018-09-15T06:46:00Z</dc:date>
    </item>
    <item>
      <title>Re: Auto Number Block Page Number</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/auto-number-block-page-number/m-p/8273197#M99599</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/564264"&gt;@pbejse&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;Why is it that the title blocks are numbered "01" "02" "03" but Elevation markers are "1" "2" "3"&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Tell us now&lt;/STRONG&gt; If you're planning to change the TEXT elevation tag to a block before I post the code.&lt;/P&gt;&lt;P&gt;&amp;lt; excluding TEXT elevation tag &amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://autode.sk/2xaAa3O" target="_blank"&gt;https://autode.sk/2xaAa3O&lt;/A&gt; &amp;lt;--- look here&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Its just how my company does it. Once the page numbers get to 10 they stop having "0" before them ("09", "10", "11"). Ideally I would like to have the elevation markers not have the "0" before the number, so just &lt;SPAN&gt;"1" "2" "3"&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt;I'm not planning to change the text elevation tag to a block. Its text as a result of needing a custom elevation tag (other than A-Z or AA-ZZ) and exploding one of the other two elevation tag blocks to make it. Thanks.&lt;/P&gt;</description>
      <pubDate>Mon, 17 Sep 2018 16:25:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/auto-number-block-page-number/m-p/8273197#M99599</guid>
      <dc:creator>LoganAC34</dc:creator>
      <dc:date>2018-09-17T16:25:04Z</dc:date>
    </item>
    <item>
      <title>Re: Auto Number Block Page Number</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/auto-number-block-page-number/m-p/8273265#M99600</link>
      <description>&lt;PRE&gt;&amp;nbsp;&lt;/PRE&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5351025"&gt;@LoganAC34&lt;/a&gt;&amp;nbsp;wrote:Its just how my company does it. Once the page numbers get to 10 they stop having "0" before them ("09", "10", "11"). Ideally I would like to have the elevation markers not have the "0" before the number, so just &lt;SPAN&gt;"1" "2" "3"&lt;/SPAN&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try this&lt;/P&gt;
&lt;PRE&gt;(defun c:ANBPN	 (/ _AttFunc _DPfunc  data     _remspace
                   Tblock   emarker  eTag     ss       i
                   e        efname   bp       f        at_TB
                   a        TagIsInsde        eString
                  )

;;;					pBe Sep 2018					;;;
;;;			Auto Number Block Page Number  			;;;
  
(defun _AttFunc (en / a v)
  (mapcar (function
            (lambda (at)
              (list (vla-get-tagstring at) (vla-get-textstring at) at))
              
            )
          (vlax-invoke en 'Getattributes)
  )
)
(Defun _DPfunc (en nm)
  	(vl-some '(lambda (d)
                 (if (eq (vlax-get d 'PropertyName) nm) (vlax-get d 'Value)))
					(Vlax-invoke en 'GetDynamicBlockProperties)
              )
  )
(defun _remspace (str)
  	(foreach func '(vl-string-right-trim vl-string-left-trim)
       	(setq str ((Eval func)  " " str)))
  )
	

(setq data '( "ELEVATION MARKER" "TITLE BLOCK" "ELEVATION TAG AA-ZZ" "ELEVATION TAG"))
  (if
    (setq Tblock nil emarker nil  eTag nil TagIsInsde nil
		ss (ssget (list
						'(-4 . "&amp;lt;OR")
						'(-4 . "&amp;lt;AND")
                              '(0 . "INSERT") (cons 2  (apply 'strcat 
					    						(mapcar '(lambda (a)(strcat   a "," ))
					                                      (cons "`*U*" data))))
                              '(-4 . "AND&amp;gt;")
                              '(-4 . "&amp;lt;AND")
                              '(0 . "TEXT")'(1 . "%%U Elevation *")'(8 . "TITLES")                              
	 					'(-4 . "AND&amp;gt;")
	 					'(-4 . "OR&amp;gt;")
                              )
                    )
          )
    (progn
	      (repeat (setq i (sslength ss))
			(setq e (vlax-ename-&amp;gt;vla-object (ssname ss (Setq i (1- i)))))			
	        		
				(Cond
						(	(eq  (vla-get-objectname e) "AcDbText")
                               		(setq eString (Vla-get-textstring e))
                               		(setq p (vl-string-search "Elevation " eString ))
                               			(setq eTag (Cons  (list
                                                                 (_remspace (substr eString  (+ 10 p))) e) eTag))
                               				)
                      		(	(eq (car data) (setq efname  (strcase (vla-get-effectivename e))))
                                			(setq att_data (_AttFunc e ))
			                           		(setq emarker (Cons
			                                                      (list (cadr (assoc "ELEVATION_LETTER." att_data))
                                                                           (caddr (assoc "ELEVATION_PAGE_NO." att_data)))	
                                                                            emarker))
			                            		)
			        		 (	(eq (cadr data) efname)(vla-GetBoundingBox e 'll 'ur)
			                           		(setq Tblock (Cons
			                                                      (list (cadr
                                                                             (assoc "SHT-NO." (_AttFunc e )))
			                                                            (mapcar 'vlax-safearray-&amp;gt;list (list ll ur))) Tblock))
			                            		)
						 (	(member  efname (cddr data))
	                           			(if (setq v (_DPfunc e "Elevation"))
			                           		(setq eTag (Cons  (list v e) eTag)))
	                           				)
	                 )
	        )
      	(if
            (and emarker Tblock efname
                 	(foreach tag eTag
                      	(Setq bp (vlax-get (cadr tag) 'Insertionpoint))
                 		(if (setq f  (vl-some '(lambda (tb)
								(setq l (caadr tb) u (cadadr tb))
									(if (and (&amp;lt; (car l)  (Car bp)  (car u))
										    (&amp;lt; (cadr l) (Cadr bp) (cadr u))) (Car tb)))	
															Tblock))
                           	(setq TagIsInsde (cons
                                                 (cons (car tag) f) TagIsInsde))
                           )
                      TagIsInsde
                      )
                 )
            
                 	(while (setq a (Car emarker))
                      (if (setq at_TB (Cdr (assoc (car a) TagIsInsde)))
                        (vla-put-textstring (cadr a) (itoa (Atoi at_TB)))
                      )
                      (setq emarker (Cdr emarker))
                    )
                 )
			)
		    )
		(princ)
		  )&lt;/PRE&gt;
&lt;P&gt;HTH&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Sep 2018 16:52:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/auto-number-block-page-number/m-p/8273265#M99600</guid>
      <dc:creator>pbejse</dc:creator>
      <dc:date>2018-09-17T16:52:42Z</dc:date>
    </item>
    <item>
      <title>Re: Auto Number Block Page Number</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/auto-number-block-page-number/m-p/8273683#M99601</link>
      <description>&lt;P&gt;It works pretty good, thanks!&amp;nbsp;Would it be too hard to have it work with the elevation tag text? Other than that it works perfectly.&lt;/P&gt;</description>
      <pubDate>Mon, 17 Sep 2018 19:38:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/auto-number-block-page-number/m-p/8273683#M99601</guid>
      <dc:creator>LoganAC34</dc:creator>
      <dc:date>2018-09-17T19:38:51Z</dc:date>
    </item>
    <item>
      <title>Re: Auto Number Block Page Number</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/auto-number-block-page-number/m-p/8274317#M99602</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5351025"&gt;@LoganAC34&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Would it be too hard to have it work with the elevation tag text? &lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Not sure I understand.&lt;/P&gt;
&lt;P&gt;This bit right here takes care of the elevation tag&amp;nbsp;text&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;....
'(0 . "TEXT")'(1 . "%%U Elevation *")'(8 . "TITLES")  
....
(	(eq  (vla-get-objectname e) "AcDbText")
                               		(setq eString (Vla-get-textstring e))
                               		(setq p (vl-string-search "Elevation " eString ))
                               			(setq eTag (Cons  (list
                                                                 (_remspace (substr eString  (+ 10 p))) e) eTag))
                               				)
...&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The program works on the posted sample drawing file.&lt;/P&gt;
&lt;P&gt;Not unless there's a change in the TEXT/String property then it wouldn't work as expected&lt;/P&gt;
&lt;P&gt;The code's selection filter is expecting to find the string value of "%%U Elevation *" on a TEXT entity that's on "TITLES" layer.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We can change the filter to something else, show us another example where the routine ignored the text elevation tag.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please&amp;nbsp;Don't keep us guessing here &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;&amp;nbsp;&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;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Sep 2018 03:58:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/auto-number-block-page-number/m-p/8274317#M99602</guid>
      <dc:creator>pbejse</dc:creator>
      <dc:date>2018-09-18T03:58:09Z</dc:date>
    </item>
    <item>
      <title>Re: Auto Number Block Page Number</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/auto-number-block-page-number/m-p/8275222#M99603</link>
      <description>&lt;P&gt;It actually works with the text, i'm just an idiot. I just forgot to switch the text to the "Titles" layer after I exploded the tag block... I'll mark this posts as solved. Thank you so much, this will save a lot of time in the future.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Sep 2018 12:05:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/auto-number-block-page-number/m-p/8275222#M99603</guid>
      <dc:creator>LoganAC34</dc:creator>
      <dc:date>2018-09-18T12:05:12Z</dc:date>
    </item>
    <item>
      <title>Re: Auto Number Block Page Number</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/auto-number-block-page-number/m-p/8488307#M99604</link>
      <description>&lt;P&gt;I know its been a while since you solved post, but&amp;nbsp;do you mind adding comments to your code? Don't worry about it if it will take too long. I'm just trying to learn from it&amp;nbsp;to so I can write a similar LISP for another idea I have. You don't need to put a comment for every line, just the start of each main function and sub functions. The one i'm mainly interested in is how you can figure out that an object is inside of a title block and get that title blocks page number.&amp;nbsp;Thanks.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Dec 2018 20:13:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/auto-number-block-page-number/m-p/8488307#M99604</guid>
      <dc:creator>LoganAC34</dc:creator>
      <dc:date>2018-12-26T20:13:23Z</dc:date>
    </item>
    <item>
      <title>Re: Auto Number Block Page Number</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/auto-number-block-page-number/m-p/8489263#M99605</link>
      <description>&lt;P&gt;&lt;SPAN class="tlid-translation translation"&gt;&lt;SPAN class=""&gt;Do you want to number the title blocks?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Dec 2018 14:13:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/auto-number-block-page-number/m-p/8489263#M99605</guid>
      <dc:creator>maratovich</dc:creator>
      <dc:date>2018-12-27T14:13:23Z</dc:date>
    </item>
    <item>
      <title>Re: Auto Number Block Page Number</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/auto-number-block-page-number/m-p/8489288#M99606</link>
      <description>&lt;P&gt;No. The original issue in this thread has been solved. The other issue I have is simple enough that I want to try to tackle it myself. I just need help understanding how &lt;SPAN&gt;pbejse's code works. I probably&amp;nbsp;should have just direct messaged them. Thanks though.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Dec 2018 14:26:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/auto-number-block-page-number/m-p/8489288#M99606</guid>
      <dc:creator>LoganAC34</dc:creator>
      <dc:date>2018-12-27T14:26:18Z</dc:date>
    </item>
  </channel>
</rss>

