AutoCAD 2010 :: Lisp To Replace Text With Block / Or To Draw Circles Around Mtext
Mar 23, 2012
I need to lay one of our existing blocks ontop of every power outlet on a floorplan (the power outlets are currently shown as a simple shape (eg. either a rectangle, triangle or circle) with text next to it.
There are hundreds of power outlets, so if there is a lisp routine for replacing any part of the power outlet with the block, eg. replacing text/mtext with a block or replacing a pline with a block.
I have found a very successful lisp routine for replacing circles with blocks, but this obviously only works on the power outlets that are shown as circles. So a simpler way of looking at it could be a lisp for drawing a circle around mtext/text then I could simply use the circle to block lisp to place the blocks.
View 5 Replies
ADVERTISEMENT
Feb 10, 2011
Is there a lisp or script program that will find and replace pre-defined text/mtext value of eg " issued for tender " for "issued for construction" without having to select anything.
View 9 Replies
View Related
Mar 8, 2012
I am looking for a lisp that can run a block replace on multiple drawings.
Something similar the the express tools block replace I suppose, just able to process many drawings at once.
I'm trying to change attributed approval stamps to attributed inter squad stamps and don't want to have to go through all 150 drawings and do it myself.
View 1 Replies
View Related
Apr 9, 2012
I am not sure why this is not working.
(setq SelectionSet (ssget "C" Point1 Point2 '((-4 . "<or") (0 . "CIRCLE") (0 . "MTEXT") (-4 . "<or"))))
I want to select circles and mtext within the specified points.
View 2 Replies
View Related
Jan 31, 2012
I have multiple singular text objects on my screen and I want to convert them to mtext so I can use the Background Mask option within mtext on my drawing. how to quickly select all the text and convert it to mtext without it combinin ginto 1 mtext?
View 9 Replies
View Related
Aug 7, 2012
I have a dynamic block that has a nested temporary block inside it. What I am wanting to do is replace the temporary block with the permanent block. I have tried several different variation of coding but I cannot seem to get this bad boy to work. have used:
(vla-put-name (vla-item (vla-get-blocks (vla-get-activedocument (vlax-get-acad-object)))) "tempBlockName") "newBlockName")
this gives me a duplicate names error.
View 1 Replies
View Related
Nov 26, 2012
Is there a way to modify this script so you don't have to manually choose the blocks. Instead have it find all block names starting with "Supply Diffuser 24x24" and replace them with a block in the drawing named V01.
(defun C:CHANGEBLOCKS(/ printDebug ssAll ssAllTotal ss ssTotal ssCount ssCount2 ssTotal ssMainBlock ssMainBlock entListMainBlock ssBlocks entListBlock entListBlock2 entElementNewBlock entElementOldBlock entElementOldBlock2 oldBlockName) ;PROGRAM CHANGES MULTIPLE BLOCKS ;WRITTEN BY --- RAUL BENITEZ ;Command reference ;subst - returns a list with a new item substituted for every occurrence of an old item ;quote (or ') - easy way to make the string into a list. ;cdr - returns a list containing all but the first element of
[code].......
View 6 Replies
View Related
Jun 20, 2012
I was able to write a LISP that replaced each node with a block of my choice.However, now I need to find a way now to replace the blocks with different blocks.Each point shares the exact same block called "PILE". Different blocks are on different layers and have 11 different colors. I'd like to replace blocks on layer 1 with a block called "1" and blocks on layer 2 with a block called "2" and so on.I was hoping there would be an easy way to do this in LISP, but I've been unable to get any of my scripts to work.
I've attached a link that visualize what my drawing is currently looking like: [URL] ......
View 2 Replies
View Related
Oct 4, 2011
3rd party tool which didn't match our scaling needs the file is a fas so I have tried to reverse engineer the whole function using trial and error. The following code works perfect except we need multiple (x amount) lines of text I have at current the M txt function which mimics and is effective for today however we need all lines to be individual.
I’m playing round with a loop but how to achieve my need..He had a 3rd party tool which didn't match our scaling needs the file is a fas so I have tried to reverse engineer the whole function using trial and error.
The following code works perfect except we need multiple (x amount) lines of text I have at current the M txt function which mimics and is effective for today however we need all lines to be individual.
;Starting lisp program...(defun C:REDtext ();Creating Layers (if non existant)...(command "layer" "m" "TEKST-1.5mm" "lt" "continuous" "" "c" "1" "" "");Memorising previous layer...(setq MYOLDLAYER (getvar "clayer"));Setting requierd layer...(COMMAND "LAYER" "SET" "TEKST-1.5mm" "");Setting variable "MYHEIGHT" to "DIMSCALE" x 2...(setq myheight (* 2 (getvar "DIMSCALE" )));Requesting and storing usser defind point...(setq MYPOINT (getpoint "Start punt :")); Requesting and storing user defind text...(setq MYTEXT (getstring T "Nieuw tekst :"));Placing text...(command "text" MYPOINT MYHEIGHT "0" MYTEXT); Restoring previous layer...(setvar "clayer" MYOLDLAYER);Closing lisp program...)
View 1 Replies
View Related
Jul 26, 2012
I am using Express Tools Block Replace how do I keep the blocking being replace from rotating to the orientation of the block using for replacement?
View 2 Replies
View Related
Jun 27, 2012
Simple LISP routine to enable the background mask of a single mtext object using dxf codes?
View 4 Replies
View Related
Mar 26, 2012
Does any Lisp routine available to batch replace all the closed polylines with an existing block?
View 9 Replies
View Related
Aug 20, 2013
I'm looking for a function to return the actual text from an mtext object.if there's a carraige return I wish to replace it with a space.
View 4 Replies
View Related
Jul 4, 2013
i make a lips that draw doors and window in 3d from block in 2d......the problem..It does not work in all autcad¡¡ the same version but different pc.
View 9 Replies
View Related
Apr 16, 2009
Tool to combine multiple pieces of Mtext into a single Mtext with paragraphs?
View 9 Replies
View Related
Nov 13, 2012
I’m trying to put together a loop for if nil or something other than text or mtext is accidentally selected than prompt text was not selected. This is what I have so far.
text or mtext is not selected than prompt
(defun C:ww ()
(while
(not
(and
(setq esel (entsel "
[Code]......
View 7 Replies
View Related
Dec 29, 2012
I am wanting to use autolisp to access the text in a MTEXT entity. assoc(1) gives me the first bit of text, but not the rest.Is there a way to use assoc to access each of a number of matches or do I need to write my own routine to find all the 1's?
View 5 Replies
View Related
May 31, 2013
I am working on a simple function to add/remove a non-printing stamp our drawings to specify a preliminary drawing. The issue is that I cannot seem to get AutoCAD to accept the text height in the Mtext command. Below is the code; try it and see.
(DEFUN NOT4CONSTRUCTION(/ CTR HGT PT1 PT2) (IF (EQ (GETVAR "CLAYER") "NOT4CONSTRUCTION") (SETVAR "CLAYER" "0")) (IF (EQ (GETVAR "CTAB") "MODEL") (SETQ HGT "8'-4"") (SETQ HGT "1"")) (IF (= (ASSOC 0 (TBLSEARCH "layer" "NOT4CONSTRUCTION")) nil) (PROGN (VL-CMDF "-LAYER" "M" "NOT4CONSTRUCTION" "C" "30" "" "TR" 90 "" "P" "N" "" "") (SETQ PT1(LIST (- (CAR (GETVAR "viewctr")) (/ (* (GETVAR "viewsize") (/ (CAR (GETVAR.
[code]....
View 9 Replies
View Related
Mar 19, 2012
Would like to be able to select mtext explode it get x y coords of last line of text then turn it back to mtext and then launch mtext at a @0,-0.5 justification TL width 5 and display the ribbon.
All seems to work except the (command ...)
Below is my attempt.
(prompt "Select Note")
(setq ss (ssget))
(command "explode" ss)
(setq ss (ssget "l")) ;get last line of text
(setq ent (entget (ssname ss 0))
ent1 (cdr (assoc 10 ent))) ;get x y coords
(command "undo" "1") ;set exploded mtext back to mtext
(setvar "lastpoint" ent1)
(command "mtext" "@0,-0.4" "j" "TL" "w" "5")
View 2 Replies
View Related
Sep 22, 2011
I have a whole bunch of labels that are single line text that I want to convert to Mtext. I have been using the Express Tools TXT2MTXT command but that only works on one label at a time. If I select all the labels at once using this command it gives me one long Mtext string. Is there a way to convert all of the labels to mtext, but still maintaining individual entities?
View 5 Replies
View Related
Jan 25, 2012
I'm looking for a lisp routine that can find and replace multileader text.
I want to replace "T." with "T+" and "B." with "B+".
All the multileaders are on layers with a suffix of "-elev".
View 9 Replies
View Related
Sep 23, 2011
I want to create a layer from selecting only some words from an mtext or text entitty.
Is it possible to highlight and select only part of the text from an mtext using a lisp routine ? similar to how Adobe Reader can select text.
View 7 Replies
View Related
Aug 2, 2012
I have a drawing with numerous text fields that I'd like to replace. For example, there are 30 different text fields showing a dimension of 19.298". I need to replace all of them so that they show 19.125" instead. Is there a quick way to swap out the text without having to do it one field at a time? Is there something that would allow me to do it globally rather than individually?
View 5 Replies
View Related
Nov 3, 2011
I'm running the following string in a routing that is looping so I get dozens of these prompts. How to supress these? Or, do i have to use to entmake?
(begin loop...
(command ".-Mtext" CSW-Tpoint "W" 0.0 (vl-filename-base (vla-get-imagefile image)) "")
);end loop
Prints to the command line..
Current text style: "Standard" Text height: 0.0833 Annotative: No
Current text style: "Standard" Text height: 0.0833 Annotative: No
Current text style: "Standard" Text height: 0.0833 Annotative: No
Current text style: "Standard" Text height: 0.0833 Annotative: No
View 3 Replies
View Related
Oct 29, 2012
When I try use ' TCOUNT ' with mtext, the numbering increments not by the value I enter (ie 1,1) but rather by the number of lines in the mtext; 3 lines of mtext would count 1, 4, 7, 10, 13...). BUT this only happens if the 'enter' button was pressed to start a new line.
View 6 Replies
View Related
Sep 16, 2002
I am trying to globally find and replace text in Autocad 2000 drawings. If I have a folder containing 10 Autocad files, I want to open every file in that folder, while in each file, search for a certain line of text and replace that text, then close that file, open the next and find/replace text in that file.
I've created an autolisp file that allows me to open all the files in a certain folder, but I can't find any way, either thru autolisp or scripts, to allow me to find and replace text in each autocad drawing without using Autocad's "find" command to manually enter the text when each drawing is open.
I want to setup the autolisp file to accept input up front, save the "old text" and "new text" to variables, then use those variables as the lisp routine is running.
This version was used to automate creating PDF files. The command 'PDF' is a command from another Lisp file.
View 9 Replies
View Related
May 17, 2012
I have a routine that looks for an MText date stamp and replace the old date with a new date. The problem is some MText strings appear encrypted. Below is an example:
{\H1.121x;\C1; \LFY 2011-12\l \H0.6252x;04-30-11} This is what I should get when I extract the string (as shown in Property window)
(1 . "\pxi-2.1818,l4.3636,ql,t4.3636;{\fSymbol|b1|i0|c2") is what I get when I extract the group code.
I'm running AutoCAD 2012 on Windows 7.
View 2 Replies
View Related
May 2, 2011
I just loaded AutoCAD 2012 on Friday and have noticed that when I use annotative text or mtext in paper space when printing or previewing the text it rotates 90 degrees to vertical, but is horizontal in the drawing. Only does this with annotative text or mtext, non annotative text and mtext remains horizontal when previewing or printing.
View 3 Replies
View Related
Jun 26, 2012
I'm searching an external RTF-Editor which is quicker then "MS Word" and better then the internal editor. Some applications use this RTF-modules.
Can one of these used by Autocad?
View 2 Replies
View Related
Dec 19, 2012
I've rotated my UCS 45° at Z axis and create a "mtext" and "text".
But when I check the angle of the "mtext" in properties palette is 0°.And the angle of the "text" is 45°.
why AutoCAD showing different angle for both objects which are in the same direction ?
[URL]
View 1 Replies
View Related
Feb 17, 2012
In AutoCAD Architecture 2012 (AutoCAD 2012) I want “Entire drawing” selected by default in “Find where:” in “Find and Replace Dialog Box” instead of “Current space/layout”.
View 1 Replies
View Related