AutoCAD 2010/2011/2012

AutoCAD 2010/2011/2012

Reply
Valued Contributor
smorrison1
Posts: 50
Registered: ‎11-03-2003
Message 1 of 3 (804 Views)
Accepted Solution

How to change existg text object's style using a script ?

804 Views, 2 Replies
10-25-2012 11:46 AM

I've wrriten a script that will create custom annotative scales and a new text style.  (It works fine up to that point) The next steps I'm trying to add to the script is to select a text object, set it to the new style, make it annotative and add all of the annotative scales to that text object.  CHPROP allows me to make the text object annotaive but I haven't found a command that will let me change the style or add annotative scales to the text object.  Does anyone know the commands I can use in a script to do this ? (or know if this is even possible)?  I have 2000+ drawings I need to run this one, I hope I can find the commands to script this with.  Thanks in advance

I found one of the commands.  OBJECTSCALE will allow you to add Annotative Scales to an object from the command line.  Now I just need to find the command to change the text style using a script.  I'm still looking through the command listings.  Please post it if you know it.  -Thanks

I found a old lisp routine from back in the old R12 Dos days that works without a dialog interface.  It lets me change the style of a text object from the command line.  So, i guess i answered my own question ... maybe this will help someone else too ?  I've attached the Lisp file in case anyone else needs it.  CHTEXT.LSP  use 'CHT' to run it. 

Valued Contributor
smorrison1
Posts: 50
Registered: ‎11-03-2003
Message 2 of 3 (792 Views)

Re: How to change existg text object's style using a script ?

10-25-2012 01:14 PM in reply to: smorrison1

I found one of the commands.  OBJECTSCALE will allow you to add Annotative Scales to an object from the command line.  Now I just need to find the command to change the text style using a script.  I'm still looking through the command listings.  Please post it if you know it.  -Thanks

Valued Contributor
smorrison1
Posts: 50
Registered: ‎11-03-2003
Message 3 of 3 (784 Views)

Re: How to change existg text object's style using a script ?

10-25-2012 02:40 PM in reply to: smorrison1

I found a old lisp routine from back in the old R12 Dos days that works without a dialog interface.  It lets me change the style of a text object from the command line.  So, i guess i answered my own question ... maybe this will help someone else too ?  I've attached the Lisp file in case anyone else needs it.  CHTEXT.LSP  use 'CHT' to run it. 

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.