amb2301 Posted September 20, 2017 Share Posted September 20, 2017 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 Quote Link to comment Share on other sites More sharing options...
BIGAL Posted September 21, 2017 Share Posted September 21, 2017 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. Quote Link to comment Share on other sites More sharing options...
BIGAL Posted September 21, 2017 Share Posted September 21, 2017 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 ""). Quote Link to comment Share on other sites More sharing options...
amb2301 Posted September 21, 2017 Author Share Posted September 21, 2017 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. Quote Link to comment Share on other sites More sharing options...
amb2301 Posted September 21, 2017 Author Share Posted September 21, 2017 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.