AutoCAD 2010/2011/2012

AutoCAD 2010/2011/2012

Reply
Active Contributor
smorrison1
Posts: 49
Registered: ‎11-03-2003
Message 1 of 3 (768 Views)
Accepted Solution

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

768 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. 

Active Contributor
smorrison1
Posts: 49
Registered: ‎11-03-2003
Message 2 of 3 (756 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

Active Contributor
smorrison1
Posts: 49
Registered: ‎11-03-2003
Message 3 of 3 (748 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
Are You Going To Be @ AU 2014? Feel free to drop by our AU topic post and share your plans, plug a class that you're teaching, or simply check out who else from the community might be in attendance. Ohh and don't forgot to stop by the Autodesk Help | Learn | Collaborate booths in the Exhibit Hall and meet our community team if you get a chance!