AutoCAD Visual LISP / AutoLISP :: How To Ensure Text Is Added As Upper Case
Apr 24, 2012
I am writing various text insertion lisp routines. I want the computer to default to UPPERCASE before the user enters any text to ensure the text is added to the drawing as UPPERCASE text at all times.
View 4 Replies
ADVERTISEMENT
Dec 19, 2013
create a routine to list all the dyanmic blocks in my drawing with a specific visibilty parameter name. The problem with the blocks that I'm trying to search for in my draiwng is that the visibility names are very similar with the only differences being CASE sensitivity (ie. OBJECT vs. Object).
(defun c:test (/ BNAME DATA E I PNAME SS VIS) (if (setq data nil vis (getstring T "
Enter the Visibility Parameter Name: ") ss (ssget"_X"(list (cons 0 "INSERT") (cons 2 "`*U*")) ) ) ;; setq (progn (repeat (setq i (sslength ss))(cond ((and (setq bname(vla-get-EffectiveName (setqe (vlax-ename->vla-object (ssname ss (setq i (1- i)) ) ) )) ) (setq Pname(car (vl-remove-if-not '(lambda(j) (eq (strcase (vla-get-PropertyName j)) (strcase vis) )) (vlax-invoke e 'GetDynamicBlockProperties) )) ) (not (member bname data)) ) (setq data (cons bname data)) (foreach itm data (print itm)) ));; cond );; repeat );; progn );; if (if (null data) (princ "
Block/Parameter Name not found")) (princ))
View 9 Replies
View Related
Aug 2, 2013
Have issues with creating an AutoCAD deployment and "The path of the added item is too long" error message?
I understand that the paths are limited to 255 characters but I tried just a local path and I get the same error.
Under Additional Files in deployment options, I want to add 2 folders under <Installation Directory> and add 2 files under Support folder.
1st folder would be ARG folder for a custom profile xxx.arg file
2nd folder would be Template with a custom template xxx.dwt file
Under Support, I want to browse and add two files: custom accaddoc.lsp and enterprise acad.cuix file.
All of those files reside on a share drive but the paths are about 40 char so I'm way below the limit.
Every time I want to add a folder under <Installation Directory> I receive the error message:
The path of the added item is too long: "Create New Folder" Please limit this path to -28 characters (currently 17).
So I copied all thos files locally but the same error show up. Is this a bug? I can't customize my deployment if those files are not available.
View 2 Replies
View Related
Dec 5, 2013
Is it even possible to get the entity name of the last block added to a layout? I need to find the entity name of the last block added to each of three layouts.
Previously I was using entlast but obviously that will not descriminate per layout.
View 8 Replies
View Related
Dec 14, 2011
do you use all caps or do you use upper case/lower case in your drawing title block, bom, and notes?
View 9 Replies
View Related
Nov 19, 2013
When I type text in PS CC, it is ALWAYS UPPER CASE. I cannot get mixed case. Fortunately I still have PS CS5 on my machine, so I was able to fix the problem there. What's going on? Windows 7 Home Premium.
View 2 Replies
View Related
Apr 2, 2013
I want to change the lower case words in shared parameters to upper case. Is there any way to make such a change in .rfa/.rte/.rvt file.
View 1 Replies
View Related
Mar 13, 2013
I know I can use the shortcut Shift F3 to bring up the Change Case Menu.
Is there a way to just highlight the text and press a shortcut or macro to change directly to UpperCase?
View 9 Replies
View Related
Jun 21, 2012
I have two attributes "REVN" and "REVD" in a block "ATT" that I would like to change (globally preferably) to the following.
(1) Existing text to keyboard entry text.
(2) Colour from existing to 10
I am a bit lost in the (command "-attdef" .......)
(defun c:atc ()
(setq rev (getstring "Please enter review"))
(setq dat (getstring "please enter date"))
(command "-attdef" .."ATT".."REVN"....."c" "10")..)
(command "-attdef" .."ATT".."REVD"....."c" "10")..)
)
View 4 Replies
View Related
Apr 11, 2013
I have a computer where all text entered in AutoCAD text/mtext comes out in uppercase. Pressing the shift key while entering the text has no effect. The CAD-Girl involved has admitted to sniffing around in Express Tools System Variables and changing a few, but she cannot remember any more which ones she changed.
View 3 Replies
View Related
Oct 8, 2013
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.
View 4 Replies
View Related
Mar 2, 2013
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?
View 9 Replies
View Related
Sep 12, 2012
We are using autocad 2012.
Is there a way to move all 3.5mm text to layer text3.5 and move all 5mm text to layer text5.
View 9 Replies
View Related
Oct 25, 2012
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
swap function for one text is here:
(defun c:swap ( / pos ent el txt)
(vl-load-com)
(if(null #div#)(setq #div# "/"))
(setq #div#
(if(=(setq tmp(getstring(strcat "
Divisor character: <"#div#"> ")))"")
#div# tmp
)
[Code]....
but I want a program to prompt me like this:
(prompt "Select objects:")(terpri)
(setq a (ssget '((0 . "TEXT"))))
and gets divisor char </>:
after that:
(setq n (sslength a))
(repeat n
....
)
repeats n times, n=number of texts in my selection
View 6 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
Aug 1, 2013
this code is used to fix specific font but its problem that it will prompt you to select single text
i need to make it to select multiple text so it saves me a lot of time,
;;; Process Individual request
(defun cht_ProcessIndividual ()
(setq sslen (sslength sset))
(while (> sslen 0)
(setq temp (ssname sset (setq sslen (1- sslen))))
[Code]...
View 2 Replies
View Related
Aug 4, 2013
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)
View 2 Replies
View Related
May 10, 2012
I have text objects with the same Z value and I will select as follows:
(setq sstxt (ssget '((0 . "TEXT")(8 . "APS-text"))))
How to store this value in another variable "zvalue" to apply to:
(command "change" "select text objects" "" "_p" "_e" zvalue "") ?
View 9 Replies
View Related
Jul 24, 2013
I wonder if one could change the characters in the part list to upper case when the file name is in lower case.
View 4 Replies
View Related
Jan 13, 2012
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.
View 5 Replies
View Related
Aug 29, 2012
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.
Like for example:
DUT.txt
2BK1;BATTERIJKAST sBk
2RK1;REMKAST sBk
and so on
ENG.txt
2BK1;BATTERY CUBICLE sBk
2RK1;BRAKE CUBICLE sBk
and so on
ITA.txt, the same
DEU.txt, the same
ESP.txt, the same
FRA.txt, the same
View 2 Replies
View Related
Jul 24, 2013
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>"))))
(setq n 0)
[Code]....
View 9 Replies
View Related
Oct 7, 2013
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.
View 4 Replies
View Related
Nov 27, 2011
I'm trying to create a leader with no attachments. Code below. But I can't seem to shut of the Annotation Dialog.
(setvar "cmddia" 0)
(vl-cmdf ".Qleader" "S" "A" "N" pt1 pt2 "" )
Also I am trying to create a leader with text that is aligned and above the leader line.
View 6 Replies
View Related
Aug 16, 2011
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?
View 8 Replies
View Related
Apr 29, 2013
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:
(defun C:uf ()
(if (setq fuse (nentsel "
Select Fuse Attribute: "))
(progn
(setq en (car fuse))
(setq enlist (entget en))
(setq fuseatt(cdr (assoc 1 enlist)) ) ) )
(if (setq mt(car (entsel "
Select Text: ")))
(progn
(setq enlist2 (entget mt))
(cdr (assoc 1 enlist2))
(setq wiren(cdr (assoc 1 enlist2)) ) ) )
)
View 8 Replies
View Related
May 6, 2009
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.
View 9 Replies
View Related
Nov 29, 2012
I cannot purge a textstyle out of my drawing. When I run purge nothing is available.
However if I select the style from the style dialog I am able to select delete and delete the style.
When I use the method on the style (vlax-invoke-method style 'Delete). AutoCAD states:
Automation Error. Object is referenced by other object(s)
The style is defenatly not in use but may have been used in the past.
View 8 Replies
View Related
Oct 15, 2012
I want to override the measurement in a dimension with a string of text using a LISP command.
E.g.. "select dimension"
type new text for dimension
replace dimension measurement with new text. I can get the entity and its values, buy not sure which value to change for the "text override".
BTW Acad 2012.
View 3 Replies
View Related
Nov 8, 2012
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.
(defun C:ww ()
(if tmp (= nil) (setq tmp "ABC"))
(prompt "
Enter prefix <")(princ tmp)(princ ">: ")
(setq pfix (strcase (getstring)))
(if (= pfix nil) (setq pfix tmp))
(setq tmp pfix)
(setq PT (getpoint "
Pick point: "))
(command "TEXT" "S" "Standard" "J" "M" PT "6" "0" pfix)
)
View 9 Replies
View Related
Oct 7, 2011
Any lisp routine out there to append (prefix) text to dtext?
i have 100s of dtext that has numbers in them, and i need to place the "#" symbol in front of them now.
View 3 Replies
View Related