Print Page | Close Window

incremental numbers into mapbook tiles

Printed From: CAD Forum
Category: EN
Forum Name: Civil 3D, Map, InfraWorks
Forum Description: Discussion about mapping and GIS applications Map, Civil3D, InfraWorks, MapGuide and Raster Design
URL: https://www.cadforum.cz/forum_en/forum_posts.asp?TID=2047
Printed Date: 12.May.2026 at 13:46


Topic: incremental numbers into mapbook tiles
Posted By: fbastian
Subject: incremental numbers into mapbook tiles
Date Posted: 27.May.2009 at 11:23
Hello, I have been producing mapbooks using CAD 3D 2009 for a short while.
On my key maps I show the map book in tiles. In the center of these tiles I manually insert a number as a presentaion purpose. However this is very time consuming and prone to error.
 
I found and downloaded from your site the Lisp InsertC.
 
I tried using it but, the truth is that I lack the experience in CAD to make this work.
 
Do I have to make the tiles into blocks? If so how do I do that?
As far as I can see the tiles are polyline objects.
 
Any suggestions or help would be very much appreciated.
 
thank you very much.
 
Fred
 



Replies:
Posted By: msplcdykee69
Date Posted: 29.May.2009 at 17:32
Here is a simple lisp called LOTNO  Copy this lisp routine below into a text file and just make sure you have a text size you have selected as current is the size it becomes You can select the text style under your toolbar "Styles".  This is a simple auto numbering lisp routine 
 
;Lotno.lsp
;This is a program to insert incremented lot numbers
;using current text.
        (defun lotn ( / p p1 p2 n1 scmde)
          (setq n1 (getint "Enter starting lot number: "))
          (setq  p1 (getpoint "\nText location: "))
          (setq scmde (getvar "cmdecho"))
           (while p1
           (setvar "cmdecho" 0)
           (setq p2 p1)
     (if (= 0.0 (cdr (assoc 40 (tblsearch "style" (getvar "textstyle")))))
            (command "text"
               "J"
               "MC"
               (setq p p1)
               (setq p "")
               (setq p "")
               (setq p n1)
            )
            (command "text"
               "J"
               "MC"
               (setq p p1)
               (setq p "")
               (setq p n1)
            )
            );if
            (setq n1 (+ n1 1))
            (setq p1 (getpoint "\nText location: "))
            (if (= p1 p2) (setq p1 nil))
           )
           (setvar "cmdecho" scmde)
           (princ)
)
        (defun C:LOTNO ()
          (lotn)
)
(princ "Type LOTNO to begin.")
(princ)


-------------
Engineering Manufacturing Medical Cables/Adjunct Instructor Engineering Graphics/Engineering Computations and Careers

msplcdykee69@yahoo.com

Shawn


Posted By: fbastian
Date Posted: 01.Jun.2009 at 04:57
Hi, I tried by saving the code as a lsp file and then uploading it into the CAD file. I could see the propmt "type lotno to begin" but when i typed 2 it gave me "unknown command".
 
I need to understand how to run lsp files onto the current CAD file. I must be doing something wrong.
can you help me further please?
 
There isnt a space for attaching files here otherwise i would so you can see what i am talking about.
 
Thanks for your help.
 
 
 
 


Posted By: Vladimir Michl
Date Posted: 01.Jun.2009 at 07:39
You should type "lotno" (verbatim, the command name) to start the command.
 
If you have Express Tools installed, you can also use the TCOUNT command. Our InsertC can be used also but you should have a block with an attribute to be used as the counter label.


-------------
Vladimir Michl (moderator)
ARKANCE - https://arkance.world" rel="nofollow - https://arkance.world - Autodesk Platinum Partner



Print Page | Close Window