I want to be able to pull the numerical value of a text and be able to increment it by a specified amount to then rewrite the text to the new number...
More specifically i have a floor plan with numbered rooms say 1-100... These numbers refer to a separate schedule with the actual room names and i am trying to keep them in order by plotted sheet... Say area "A" on the first sheet is numbers 1-10...
If halfway through the naming process i notice that i forgot a room in section "A" i now need to increment all the numbers 11-100 by one to 12-101 and add the room number to section "A" that now contains 1-11...
Currently i use TCOUNT to individually select each number in order 11,12,13,14 - 99, 100... to increment this way is very tedious and it would be easier if i could just select the numbers 11-100 with a bounding box and be able to extract the text, convert it to a number, increment, rewrite the original text for every selected text no matter of order..It has been so long since i have written lisp that i am not really sure where to begin..
I have a series of blocks that I need to insert into a drawing, maybe 100-200 times and then change one of the 6 attributes by an increment of 1.
I've looked at some of the older posts and have not been able to do this. Is it possible to take the tag regerence, in this case OUTLET_REF and automatically add 1 to it when the symbol is inserted.
Can this be done using Diesel or with a bit of lisp?
When I click on an object to retrieve it's extended data, the data keeps writing to the right, it does not return to the next line, when the text approaches the end of the screen. Very difficult to analyze information.
I want to know is there any formula/calculation for the width of text object before creation/insertion? At now I used approximated width size via a simple .
(Defun GetStrWidth (str H W) (fix (*(* H W) (strlen str))));;usage: (GetStrWidth "This is a Text." 2.5 0.8);;H: TextHeight; W: width factor.
I know that for the existed text in drawing I can use textbox command, but for the texts that has not been created, what can I do? Is there any formula/calculation depends on font name, text height and width factor?
A program that prompts:"select objects:" then I can select some objects like as text, line, circle,... after that program find all texts in selected items and swap text
swap means: xxx/yyy ===> yyy/xxx ; "/" is a divisor
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...)
I have inside every text,Mtext contents different text style like Arial_1 , Arial_2.
How i can give all the contents inside one style ? the normal procedure i will enter inside text to enter editing mode and changing text format style one by one. I want it once.
I want to save my routing of entering every text to change its content text style.
(Notice:select all from outside without editing mode will not do the job)
I use the bounding box (vla-getboundingbox) to assess parameters of blocks. These blocks have text on some of the faces that extends beyond the simple dimensions of the blocks themselves. I'm wanting to have bounding box ignore the text and can't sort it out. I've tried putting the text on a separate layer and turning it off and freezing it.
I've considered looking at sub entities and filtering out the text but I don't know if there is a solution here or not.
I have an mdb database, with one table called MATRIX. That table has seven relevant fields, see attachment. What I want to have is for every language an txt file.
This is a routine that draws a line between duplicate text.
Would it be possible to have the line as bold red p-line so that its easier to identify.
;; This AutoLISP routine examines all the user-selected TEXT and MTEXT items, ;; and draws a line on the current layer between any two that have identical ;; string values. ;; Leading and trailing blanks spaces are ignored. ;; %% modifiers, like %%u, are not ignored. ;; Upper- and lower-case differences are not ignored.
(defun c:fdt () ;;Find Duplicate Text
(prompt "Select text items to examine: ") (setq ss (ssget '((-4 . "<OR") (0 . "TEXT") (0 . "MTEXT") (-4 . "OR>"))))
I've looked around several places for a LISP that will alphabetize existing text. I cant seem to find what I need. I am looking for a routine where I can manually select text in a given order to get the outcome of AA,AB,AC,AD, or BA,BB,BC., etc.
I've attached a drawing to better explain what I am looking for. I do not know how to write LISP routines, but I know a little to be able to modify an existing one.
I have encounter some text exploding problem. As shown in attachment, I would like to know if there any possible way I can explode the text into polyline or single line and maintain it within the position and style?
I run into some issues where i need to change an attribute based on where a block is located on a drawing. I started this routine to select the block, and then select the text that I want to change the block attribute to. It seems like everything is working up until this point. What I want to do is then replace the first selected with the second selection. How would I go about doing that? here's my code so far:
The PARTS LISTS on our old drawings are simply text entities and lines. Some are MTEXT. But our new drawing template has us creating our parts list using the actual AutoCAD TABLES entity.
I'm looking for the best method to go from lines and text in AutoCAD, to an AutoCAD table. As of now, I have to retype everything since I can't select a column/row or group of text entities, copy/paste into a table.
Any LISP function that will allow me to go from TEXT and LINES to a TABLE? I've tried B2E (lisp name) but it's not working - found that on a lisp site somewhere.
How to do a default text for getstring? I would use initget in the following except the prefix can be any letter(s). And the problem with what I have below is it does not type the default text if nothing is entered.
I have a block "MANAGER" with Two Attributes "CETOP" and "CEBOT" I would like a lisp to replace what ever is in those attributes with defined text, for my purposes "Text1" and "Text2". I would like a simple routine that even I can understand so I can apply it to a couple of other lisp projects I have.