Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to edit a text using script?

8 REPLIES 8
SOLVED
Reply
Message 1 of 9
ngonzaga
4025 Views, 8 Replies

How to edit a text using script?

Hi all,

I need to edit a text in my dwg using a script.

How I do it?

 

Thanks,

 

8 REPLIES 8
Message 2 of 9
devitg
in reply to: ngonzaga

Why a SCRIPT.?
Message 3 of 9
ngonzaga
in reply to: ngonzaga

Hi devitg,

I make a program that create a scr file with a lot of Autocad commands.

After to open a specified template I call this scr and my drawing is ready.

But when I use ddedit to edit a text, the box 'Edit Text' stop my script.

So, I need to edit a text without this box, using script.

 

Any Ideas?

 

 

Message 4 of 9
pbejse
in reply to: ngonzaga


@ngonzaga wrote:

Hi devitg,

I make a program that create a scr file with a lot of Autocad commands.

After to open a specified template I call this scr and my drawing is ready.

But when I use ddedit to edit a text, the box 'Edit Text' stop my script.

So, I need to edit a text without this box, using script.

 

Any Ideas?

 

 


What Devtg  is wondering (as most of us here) is why not a lisp routine that you can call from  the command prompt.that will do the same thing as your script..

 

 

 

Message 5 of 9
ngonzaga
in reply to: ngonzaga

Ok.

But How I can do it using lisp?

I have only a handle of the object text and Handent didn't work.

I need a lisp routine passing a handle and a new text, and this lisp change the text.

 

Tks,

 

 

Message 6 of 9
CADaSchtroumpf
in reply to: ngonzaga

Don't use DDEDIT in your script...

 

Command _CHANGE can be useful for this. After multiple "enter" you have the last option for change the text.

Message 7 of 9
ngonzaga
in reply to: ngonzaga

Hi CADaStroumph,

 

Thanks a lot, it works very nice.

 

Ngonzaga 

 

 

Message 8 of 9
pbejse
in reply to: ngonzaga

 Out of curiosity ngonzaga. what does your script do? that you need to dig in and retrieve the entitiy handles?

 

You said you try the lisp approach and it didint work for you, just wondering is all

 

 

Message 9 of 9
ngonzaga
in reply to: ngonzaga

Hi pbejse,

I have a template with a drawing almost ready with some text, block attributes and dimensions with reseted values.

I make a big script in .NET that erase some entities, create another ones and changes the text of entities above.

This script run on my server and when the dwg is ready the server send the dwg back to user.

I use only one license of my acad and the user never see the mounting of the drawing.

It's good and works very nice.

 

regards,

NG

 

 

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

Post to forums  

Autodesk Design & Make Report

”Boost