Jump to content

Lisp required to make text rotated to 0 angle & make changes in font style & height


amb2301

Recommended Posts

Hi Lisp Legends,

i need a help in creating a lisp, actually i have drawing with lot (nearly thousands of text to converted in a single drawing file) of text to be converted from different angles to zero angle & also to change its text height & font style as shown in attached .dwg file,

Another important thing is i need to remove the / symbol from that text & re-arrange as shown in the attached .dwg file.

Kindly look on this & requesting to please provide lisp for this work.

TEXT CONVERTION.dwg

Link to comment
Share on other sites

Everything you want has been done before, using vlisp it is a simple task to use a PUT to change a text value eg (vla-put-Rotation txtobject 0.0) same with text style. Or use the entity dxf codes and entmod.

 

ObjectName (RO) = "AcDbMText"

; OwnerID (RO) = 43

; PlotStyleName = "ByLayer"

; Rotation = 0.504313

; StyleName = "dgnlstyle-lstyle"

; TextString = "P50/450D6 GEL/FUSION 1439"

 

these are in a suggested order.

1 There is lots of examples regarding search and replace the easiest is from command line FIND P50/ Replace with nothing.

2 The text to mtext again a bit of a quick search should find.

3 The / to new line was solved say last week here at cadtutor.

4 Change angle and style.

Link to comment
Share on other sites

Everything you want has been done before, using vlisp it is a simple task to use a PUT to change a text value eg (vla-put-Rotation txtobject 0.0) same with text style. Or use the entity dxf codes and entmod.

 

ObjectName (RO) = "AcDbMText"

; OwnerID (RO) = 43

; PlotStyleName = "ByLayer"

; Rotation = 0.504313

; StyleName = "dgnlstyle-lstyle"

; TextString = "P50/450D6 GEL/FUSION 1439"

 

these are in a suggested order.

1 There is lots of examples regarding search and replace the easiest is from command line FIND P50/ Replace with nothing.

2 The text to mtext again a bit of a quick search should find.

3 The / to new line was solved say last week here at cadtutor.

4 Change angle and style.

 

Hi Bigal,

Thanks for your reply, actually i am not aware of VLSIP, could you please help me on how to save your code & use it.

Link to comment
Share on other sites

Here is a start for the P50/ http://www.cadtutor.net/forum/showthread.php?101748-Replace-multiple-textstring just make the new string (setq new "").

 

Hi Bigal,

sorry for not informing earlier, actually its not P50/ all over the drawing.... it varies like Pxx/ So i need it like whatever starts with P & ends with / to be removed....is that possible? please help

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...