Community
AutoCAD LT Forum
Welcome to Autodesk’s AutoCAD LT Forums. Share your knowledge, ask questions, and explore popular AutoCAD LT topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Automatic sequential numbers in LT

13 REPLIES 13
SOLVED
Reply
Message 1 of 14
Anonymous
8396 Views, 13 Replies

Automatic sequential numbers in LT

Hello,

 

I have a drawing which requires multiple areas highlighted by sequential numbering and i am hoping (on my knees and looking to the sky) that there is an easier way than inputting hundreds of individual text lines. 

 

Any advice would be greatly appreciated. 

 

Stephen  

13 REPLIES 13
Message 2 of 14
Anonymous
in reply to: Anonymous

I have good news and bad news.

 

The good news is that AutoCAD has a function that does that. It's called TCOUNT.

The bad news is that it's not included in LT.

Message 3 of 14
pendean
in reply to: Anonymous

There are many posts with macros for LT to do that, help yourself https://www.google.com/search?q=sequential+numbers+in+AutoCADLT
Message 4 of 14
Anonymous
in reply to: pendean

I tried a few and they can't be considered a proper alternative for TCOUNT.

Message 5 of 14
steven-g
in reply to: Anonymous

They aren't an alternative, they are a method by which you can reduce the repetative nature of some tasks in LT. Full Autocad has many tools built in designed just for that purpose, and in LT it isn't a question of trying to copy what full Autocad does, but to find a method that simplifies your daily tasks.

Message 6 of 14
pendean
in reply to: Anonymous

You are comparing apples to oranges: the OP needs help with AutoCADLT, not teased by features they can't use.
Message 7 of 14
Anonymous
in reply to: steven-g

Clicking the same button a couple hundred times is just as repetitive, so no real improvement there.

If you need to do this a lot you're much better of with the full version.

 

Currently I'm also stuck with LT, gives me a headache knowing how much easier and faster things would be with full AutoCAD.

Message 8 of 14
pendean
in reply to: Anonymous

You did not really go through those solutions at all, did you. Try again, while not "nirvana" it's faster than manually typing hundreds if numbers the long way.

Again, this forum is to help AutoCADLT users with their software and work within its limitations, not demoralize them.
Message 9 of 14
cadffm
in reply to: Anonymous

@Anonymous

Please upload an dwg example for me,
Situation before and after..

I can not understand exactly, but i want to help to help yourself, when its possible.

Sebastian

EESignature

Message 10 of 14
john.vellek
in reply to: Anonymous

Hi @Anonymous,

 

I have seen one solution for this but it might be a bit perilous as there is no great way to check for errors.  The solution is to set the first value. Then for following that sequentially, the second value is a FIELD set to equal the first value +1 in a formula. Then copying this field to new ones to always use the previous object would result in sequential numbering.

 

I personally have not had much success with this method but let me research the forums to find this solution documented in more detail as it appeared to work for that customer.

 

 

Please select the Accept as Solution button if my post solves your issue or answers your question.


John Vellek


Join the Autodesk Customer Council - Interact with developers, provide feedback on current and future software releases, and beta test the latest software!

Autodesk Knowledge Network | Autodesk Account | Product Feedback
Message 11 of 14
Paul_Gander
in reply to: Anonymous

Here's my contribution to the range of macros available for general purpose automatic numbering. I hope I've brought something new to the party.

 

This macro creates new mtext objects made up of a prefix string, a numerical value and a suffix string. The numerical value is increased after each insertion by an amount (increment) set by the user.

 

Before you use the macro, set your text style. If your text style does not have a fixed text height, set TEXTSIZE to the height you want or the macro will use the height set by the last text/mtext command executed. I've used mtext because the text command behaves differently if the text style has a fixed height and would need a more complex macro to test for this.

 

Start the macro and the current settings will be displayed.

 

You will need to have the command line on with several lines of history visible in order to see the prompts. The prompts will appear above the command line.

 

You will be asked if you want to change the settings. If you enter Y, you will see the following prompts:

 

Enter character for null:
Enter prefix:
Enter suffix:
Enter start value:
Enter increment:
Enter justification [TL/TC/TR/ML/MC/MR/BL/BC/BR]:

 

After each prompt a default value/string will be displayed. This will usually be the last used value. Press enter to accept the default or type a new value.

The default character for null is . (full stop/period.) This is required because the strings are stored as environment variables. Once a variable has been given a value it is not possible to set it to an empty string using SETENV. Use the null character to set the prefix/suffix string if you do not wish any text to be displayed before/after the numeric value. Set the null character to something different should you wish to use . as the prefix/suffix.

 

The macro uses the obsolete system variable PSPROLOG for text entry. This allows the user type strings containing spaces without having to enclose the string in quotes. Do not use " $ or \ in strings as they confuse the diesel interpreter.

 

Be sure to enter valid numeric values for the start and increment values. There is no error trapping for this. The numbers can be negative.

 

If you do not enter a valid justification code as listed, you will receive an error message and prompted to try again.

 

Once you have accepted or changed all the settings you will be prompted for an insertion point. Pick a point and the mtext will be inserted and the counter incremented. This will continue until you right click or press enter/space. Do not press escape at any point or the macro will not finish properly and some settings may not be restored.

 

These instructions are a bit lengthy but I'm sure you'll find it easy to use.

 

*^c^c$m=$(if,$(or,$(eq,$(getenv,pgm_c),0),$(eq,$(getenv,pgm_c),)),$(if,$(and,$(getvar,menuecho),5),,^p)menuecho 3 $(if,$(and,$(getvar,menuecho),4),^p)setenv pgk_q """"""""""; pgm_c 2)$(if,$(eq,$(getenv,pgm_c),2),setenv pgm_c 0 $(if,$(eq,$(getenv,pgm_null),),setenv pgm_null . )$(if,$(eq,$(getenv,pgm_val),),setenv pgm_val 1 )$(if,$(eq,$(getenv,pgm_inc),),setenv pgm_inc 1 )setenv pgm_c 3)$(if,$(eq,$(getenv,pgm_c),3),setenv pgm_c 0  pgm_justv $(upper,$(substr,$(getenv,pgm_just),1,1))  pgm_justh $(upper,$(substr,$(getenv,pgm_just),2,1))  pgm_c 4)$(if,$(eq,$(getenv,pgm_c),4),setenv pgm_c $(if,$(or,$(eq,$(getenv,pgm_justv),T),$(eq,$(getenv,pgm_justv),M),$(eq,$(getenv,pgm_justv),B)),5,6))$(if,$(eq,$(getenv,pgm_c),5),setenv pgm_c $(if,$(or,$(eq,$(getenv,pgm_justh),L),$(eq,$(getenv,pgm_justh),C),$(eq,$(getenv,pgm_justh),R)),8,6))$(if,$(eq,$(getenv,pgm_c),6),setenv pgm_c 0  pgm_justv T  pgm_justh L  pgm_c 8)$(if,$(eq,$(getenv,pgm_c),8),setenv pgm_c 0  pgm_just $(getenv,pgm_justv)$(getenv,pgm_justh)  pgm_c 10)$(if,$(eq,$(getenv,pgm_c),10),setenv pgm_c 0  pgm_msg $(getenv,pgk_q)Current output = $(if,$(eq,$(getenv,pgm_pre),$(getenv,pgm_null)),,$(getenv,pgm_pre))$(getenv,pgm_val)$(getenv,pgk_q)  pgm_c 11)$(if,$(eq,$(getenv,pgm_c),11),setenv pgm_c 0  pgm_msg $(getenv,pgk_q)$(getenv,pgm_msg)$(if,$(eq,$(getenv,pgm_suf),$(getenv,pgm_null)),,$(getenv,pgm_suf))$(getenv,pgk_q) getenv pgm_msg;setenv pgm_c 13)$(if,$(eq,$(getenv,pgm_c),13),setenv pgm_c 0  pgm_msg $(getenv,pgk_q)Increment = $(getenv,pgm_inc)", Justification = "$(getenv,pgm_just)$(getenv,pgk_q) getenv pgm_msg;setenv pgm_c 15)$(if,$(eq,$(getenv,pgm_c),15),setenv pgm_c 0 lastpoint "0,0,0" setenv pgm_str No  pgm_msg $(getenv,pgk_q)Change settings? [Yes/No] <No>:$(getenv,pgk_q) getenv pgm_msg;setenv pgm_str \ pgm_c 20)$(if,$(eq,$(getenv,pgm_c),20),setenv pgm_c $(if,$(eq,$(upper,$(substr,$(getenv,pgm_str),1,1)),N),tloop,30))$(if,$(eq,$(getenv,pgm_c),30),setenv pgm_c 0 psprolog $(getenv,pgm_null);setenv pgm_msg $(getenv,pgk_q)Enter character for null <$(getenv,pgm_null)>:$(getenv,pgk_q) getenv pgm_msg;psprolog \setenv pgm_c 35)$(if,$(eq,$(getenv,pgm_c),35),setenv pgm_c 0  pgm_null $(getenv,pgk_q)$(if,$(eq,$(getvar,psprolog),),.,$(getvar,psprolog))$(getenv,pgk_q) setenv pgm_c 37)$(if,$(eq,$(getenv,pgm_c),37),setenv pgm_c 0 $(if,$(eq,$(getenv,pgm_pre),),setenv pgm_pre $(getenv,pgk_q)$(getenv,pgm_null)$(getenv,pgk_q) )setenv pgm_c 38)$(if,$(eq,$(getenv,pgm_c),38),setenv pgm_c 0 $(if,$(eq,$(getenv,pgm_suf),),setenv pgm_suf $(getenv,pgk_q)$(getenv,pgm_null)$(getenv,pgk_q) )setenv pgm_c 40)$(if,$(eq,$(getenv,pgm_c),40),setenv pgm_c 0 psprolog $(getenv,pgm_pre);setenv pgm_msg $(getenv,pgk_q)Enter prefix <$(getenv,pgm_pre)>: $(getenv,pgk_q) getenv pgm_msg;psprolog \setenv pgm_c 45)$(if,$(eq,$(getenv,pgm_c),45),setenv pgm_c 0  pgm_pre $(getenv,pgk_q)$(if,$(eq,$(getvar,psprolog),),.,$(getvar,psprolog))$(getenv,pgk_q) setenv pgm_c 50)$(if,$(eq,$(getenv,pgm_c),50),setenv pgm_c 0 psprolog $(getenv,pgm_suf);setenv pgm_msg $(getenv,pgk_q)Enter suffix <$(getenv,pgm_suf)>:$(getenv,pgk_q) getenv pgm_msg;psprolog \setenv pgm_c 55)$(if,$(eq,$(getenv,pgm_c),55),setenv pgm_c 0  pgm_suf $(getenv,pgk_q)$(if,$(eq,$(getvar,psprolog),),.,$(getvar,psprolog))$(getenv,pgk_q) psprolog .;setenv pgm_c 60)$(if,$(eq,$(getenv,pgm_c),60),setenv pgm_c 0  pgm_msg $(getenv,pgk_q)Enter start value <$(getenv,pgm_val)>:$(getenv,pgk_q) getenv pgm_msg;setenv pgm_val \ pgm_c 70)$(if,$(eq,$(getenv,pgm_c),70),setenv pgm_c 0  pgm_msg $(getenv,pgk_q)Enter increment <$(getenv,pgm_inc)>:$(getenv,pgk_q) getenv pgm_msg;setenv pgm_inc \ pgm_c jloop)$(if,$(eq,$(getenv,pgm_c),jloop),setenv pgm_c 0  pgm_msg $(getenv,pgk_q)Enter justification [TL/TC/TR/ML/MC/MR/BL/BC/BR] <$(getenv,pgm_just)>:$(getenv,pgk_q) getenv pgm_msg;setenv pgm_justh \ pgm_c 71)$(if,$(eq,$(getenv,pgm_c),71),setenv pgm_c 0  pgm_justv $(upper,$(substr,$(getenv,pgm_justh),1,1))  pgm_justh $(upper,$(substr,$(getenv,pgm_justh),2,1))  pgm_c 72)$(if,$(eq,$(getenv,pgm_c),72),setenv pgm_c $(if,$(or,$(eq,$(getenv,pgm_justv),T),$(eq,$(getenv,pgm_justv),M),$(eq,$(getenv,pgm_justv),B)),73,75))$(if,$(eq,$(getenv,pgm_c),73),setenv pgm_c $(if,$(or,$(eq,$(getenv,pgm_justh),L),$(eq,$(getenv,pgm_justh),C),$(eq,$(getenv,pgm_justh),R)),78,75))$(if,$(eq,$(getenv,pgm_c),75),setenv pgm_c 0  pgm_msg $(getenv,pgk_q)Invalid option keyword.$(getenv,pgk_q) getenv pgm_msg;setenv pgm_c jloop)$(if,$(eq,$(getenv,pgm_c),78),setenv pgm_c 0  pgm_just $(getenv,pgm_justv)$(getenv,pgm_justh)  pgm_c tloop)$(if,$(eq,$(getenv,pgm_c),tloop),setenv pgm_c 0  pgm_lp $(getvar,lastpoint)  pgm_msg $(getenv,pgk_q)Specify insertion point:$(getenv,pgk_q) getenv pgm_msg;id \setenv pgm_c 80)$(if,$(eq,$(getenv,pgm_c),80),setenv pgm_c $(if,$(eq,$(getvar,lastpoint),$(getenv,pgm_lp)),end,90))$(if,$(eq,$(getenv,pgm_c),90),setenv pgm_c 0  pgm_str $(getenv,pgk_q)$(if,$(eq,$(getenv,pgm_pre),$(getenv,pgm_null)),,$(getenv,pgm_pre))$(getenv,pgm_val)$(getenv,pgk_q)  pgm_c 95)$(if,$(eq,$(getenv,pgm_c),95),setenv pgm_c 0  pgm_str $(getenv,pgk_q)$(getenv,pgm_str)$(if,$(eq,$(getenv,pgm_suf),$(getenv,pgm_null)),,$(getenv,pgm_suf))$(getenv,pgk_q)  pgm_c 100)$(if,$(eq,$(getenv,pgm_c),100),setenv pgm_c 0 -mtext;@ j $(getenv,pgm_just) w 0 $(getenv,pgm_str);;setenv pgm_val $(+,$(getenv,pgm_val),$(getenv,pgm_inc))  pgm_c tloop)$(if,$(eq,$(getenv,pgm_c),end),setenv pgm_c 0 ^cmenuecho 0)
Message 12 of 14
Anonymous
in reply to: Paul_Gander

Thank you all for your input and advice - I admit I was hoping for a nice easy solution like COUNT (If anyone from AutoCAD is listening,  make it happen! CADLT users have feelings and value their time as well!).

 

I have just recently started using the programme and I am starting to get a hang of the basics but the Macros stuff is beyond me so I will make do with individually numbering elements for the time being and when I find some time I will have a read through the macros stuff.

 

CE

 

Message 13 of 14
Anonymous
in reply to: Anonymous

Many answers for LT can be found here

 

https://www.theswamp.org/index.php

 

Give it a shot. If they don't have it. Someone could very well help you out.

Message 14 of 14
Paul_Gander
in reply to: Anonymous

As you are just starting out, please do not be put off by the complexity of this macro. They can be as simple as a few commands and save a lot of time and effort. You do not necessarily need any programming experience to create and use them. Once you have learned how to use the CUI command to create a new command button you can start writing your own macros or copy and paste other people's into the macro field of the command properties pallette.

 

Good luck.

 

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Forma Design Contest


Technology Administrators