Jump to content

Search the Community

Showing results for tags 'text'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • CADTutor
    • News, Announcements & FAQ
    • Feedback
  • AutoCAD
    • AutoCAD Beginners' Area
    • AutoCAD 2D Drafting, Object Properties & Interface
    • AutoCAD Drawing Management & Output
    • AutoCAD 3D Modelling & Rendering
    • AutoCAD Vertical Products
    • AutoCAD LT
    • CAD Management
    • AutoCAD Bugs, Error Messages & Quirks
    • AutoCAD General
    • AutoCAD Blogs
  • AutoCAD Customization
    • The CUI, Hatches, Linetypes, Scripts & Macros
    • AutoLISP, Visual LISP & DCL
    • .NET, ObjectARX & VBA
    • Application Beta Testing
    • Application Archive
  • Other Autodesk Products
    • Autodesk 3ds Max
    • Autodesk Revit
    • Autodesk Inventor
    • Autodesk Software General
  • Other CAD Products
    • BricsCAD
    • SketchUp
    • Rhino
    • SolidWorks
    • MicroStation
    • Design Software
    • Catch All
  • Resources
    • Tutorials & Tips'n'Tricks
    • AutoCAD Museum
    • Blocks, Images, Models & Materials
    • Useful Links
  • Community
    • Introduce Yourself
    • Showcase
    • Work In Progress
    • Jobs & Training
    • Chat
    • Competitions


  • Programs and Scripts
  • 2D AutoCAD Blocks
  • 3D AutoCAD Blocks
  • Images
    • Backgrounds

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...

  1. Hello all, Could anyone tell me how to alter this code? It asks to pick a value then whether to apply it once or multiple times. In multiple mode, you still only choose one at a time. I would like to be able to apply to multiple objects at once, using a selection box. Thanks -Nobull ;;;;Realization {Smirnoff} ;;; TTCM - Text to Text copy whith Matchprop. Copy text from DIMENSION, TEXT, ;;;MTEXT, ATTRIB, ATTDEF, ACAD_TABLE to one (defun c:tt (/ actDoc vlaObj sObj sText curObj oldForm oType oldMode conFlag errFlag *error* prop) (vl-load-com) (setq actDoc(vla-get-ActiveDocument (vlax-get-acad-object))) (vla-StartUndoMark actDoc) (defun TTC_Paste(pasteStr / nslLst vlaObj hitPt hitRes Row Column) (setq errFlag nil) (if (setq nslLst(nentsel "\nPaste text >")) (progn (cond ( (and (= 4(length nslLst)) (= "DIMENSION"(cdr(assoc 0(entget(car(last nslLst)))))) ); end and (setq vlaObj (vlax-ename->vla-object (cdr(assoc -1(entget(car(last nslLst))))))) (if (vl-catch-all-error-p (vl-catch-all-apply 'vla-put-TextOverride(list vlaObj pasteStr))) (progn (princ "\n Can't paste. Object may be on locked layer. ") (setq errFlag T) ); end progn ); end if ); end condition #1 ( (and (= 4(length nslLst)) (= "ACAD_TABLE"(cdr(assoc 0(entget(car(last nslLst)))))) ); end and (setq vlaObj (vlax-ename->vla-object (cdr(assoc -1(entget(car(last nslLst)))))) hitPt(vlax-3D-Point(trans(cadr nslLst)1 0)) hitRes(vla-HitTest vlaObj hitPt (vlax-3D-Point '(0.0 0.0 1.0)) 'Row 'Column) ); end setq (if(= :vlax-true hitRes) (progn (if (vl-catch-all-error-p (vl-catch-all-apply 'vla-SetText(list vlaObj Row Column pasteStr))) (progn (princ "\n Can't paste. Object may be on locked layer. ") (setq errFlag T) ); end progn ); end if ); end progn ); end if ); end condition # 2 ( (and (= 4(length nslLst)) (= "INSERT"(cdr(assoc 0(entget(car(last nslLst)))))) ); end and (princ "\nCan't paste to block's DText or MText. Select Attribute ") (setq errFlag T) ); end condition #3 ( (and (= 2(length nslLst)) (member(cdr(assoc 0(entget(car nslLst)))) '("TEXT" "MTEXT" "ATTRIB" "ATTDEF")) ); end and (setq vlaObj (vlax-ename->vla-object(car nslLst))) (if (vl-catch-all-error-p (vl-catch-all-apply 'vla-put-TextString(list vlaObj pasteStr))) (progn (princ "\nError. Can't pase text. ") (setq errFlag T) ); end progn ); end if ); end condition #4 (T (princ "\nCan't paste. Invalid object. ") (setq errFlag T) ); end condition #5 ); end cond (if (and (null errFlag) (= (type vlaObj) 'VLA-OBJECT)) (mapcar '(lambda (x y) (vlax-put-property vlaObj x y)) '(Linetype LineWeight Color Layer) prop ) ) T ); end progn nil ); end if ); end of TTC_Paste (defun TTC_MText_Clear(Mtext / Text Str) (setq Text "") (while(/= Mtext "") (cond ((wcmatch (strcase (setq Str (substr Mtext 1 2))) "[url="file://\\"]\\[/url][\\{}`~]") (setq Mtext(substr Mtext 3) Text(strcat Text Str) ); end setq ); end condition #1 ((wcmatch(substr Mtext 1 1) "[{}]") (setq Mtext (substr Mtext 2)) ); end condition #2 ( (and (wcmatch (strcase (substr Mtext 1 2)) "[url="file://\\P"]\\P[/url]") (/=(substr Mtext 3 1) " ") ); end and (setq Mtext (substr Mtext 3) Text (strcat Text " ") ); end setq ); end condition #3 ((wcmatch (strcase (substr Mtext 1 2)) "[url="file://\\"]\\[/url][LOP]") (setq Mtext(substr Mtext 3)) ); end condition #4 ((wcmatch (strcase (substr Mtext 1 2)) "[url="file://\\"]\\[/url][ACFHQTW]") (setq Mtext (substr Mtext (+ 2 (vl-string-search ";" Mtext)))) ); end condition #5 ((wcmatch (strcase (substr Mtext 1 2)) "[url="file://\\S"]\\S[/url]") (setq Str(substr Mtext 3 (- (vl-string-search ";" Mtext) 2)) Text(strcat Text (vl-string-translate "#^\\" " " Str)) Mtext(substr Mtext (+ 4 (strlen Str))) ); end setq (print Str) ); end condition #6 (T (setq Text(strcat Text(substr Mtext 1 1)) Mtext (substr Mtext 2) ) ); end condition #7 ); end cond ); end while Text ); end of TTC_MText_Clear (defun TTC_Copy (/ sObj sText tType actDoc) (if (and (setq sObj(car(nentsel "\nCopy text... "))) (member(setq tType(cdr(assoc 0(entget sObj)))) '("TEXT" "MTEXT" "ATTRIB" "ATTDEF")) ); end and (progn (setq actDoc(vla-get-ActiveDocument (vlax-get-Acad-object)) sText(vla-get-TextString (vlax-ename->vla-object sObj)) ); end setq (if(= tType "MTEXT") (setq sText(TTC_MText_Clear sText)) ); end if ); end progn ); end if (setq prop (mapcar '(lambda (x) (vlax-get-property (vlax-ename->vla-object sObj) x)) '(Linetype LineWeight Color Layer) ) ) sText ); end of TTC_Copy (defun CCT_Str_Echo(paseStr / comStr) (if(< 20(strlen paseStr)) (setq comStr (strcat (substr paseStr 1 17)"...")) (setq comStr paseStr) ); end if (princ (strcat "\nText = \"" comStr "\"")) (princ) ); end of CCT_Str_Echo (defun *error*(msg) (vla-EndUndoMark (vla-get-ActiveDocument (vlax-get-acad-object))) (princ "\nQuit TTCM") (princ) ); end of *error* (if(not ttc:Mode)(setq ttc:Mode "Multiple")) (initget "Multiple Pair-wise") (setq oldMode ttc:Mode ttc:Mode (getkword (strcat "\nSpecify mode [Multiple/Pair-wise] <" ttc:Mode ">: ")) conFlag T paseStr "" ); end setq (if(null ttc:Mode)(setq ttc:Mode oldMode)) (if(= ttc:Mode "Multiple") (progn (if(and(setq paseStr(TTC_Copy))conFlag) (progn (CCT_Str_Echo paseStr) (while(setq conFlag(TTC_Paste paseStr))T ); end while ); end progn ); end if ); end progn (progn (while (and conFlag paseStr) (setq paseStr(TTC_Copy)) (if(and paseStr conFlag) (progn (CCT_Str_Echo paseStr) (setq errFlag T) (while errFlag (setq conFlag(TTC_Paste paseStr)) );end while ); end progn ); end if ); end while ); end progn ); end if (vla-EndUndoMark actDoc) (princ "\nQuit TTCM") (princ) ); end c:ttc (princ "\n\t TTCM - Text to Text copy with matchprop.") (princ "\nCopy text from DIMENSION, TEXT, MTEXT, ATTRIB, ATTDEF, ACAD_TABLE to one")
  2. This lisp routine is to set decimal digits after a comma in any integer to 2 digit for any set of entries even in term of text ,, how to avoid the appearance of 0 .. ( ex : 25.456 ~25.460 , 25.322~25.320 ) last 0 isn't preferable ..
  3. Hey guys, Just a quick one - hopefully someone will be able to set me straight pretty easily. When I print PDFs using the AutoCAD PDF creator (DWG to PDF.pc3).... I get a pretty nasty representation of the text within the DWGs (see attached image). Does anyone know of a setting or a workaround which would enable better quality PDF production? Thanks so much for all your help.
  4. Please Help I am New to forum How to get duplicate and missing text number sequence in a particular layer in AutoCAD using .NET C#
  5. Hi i have a drawing boarder that is a block with enter-able text fields for drawing revision etc but for some reason the order in which you would enter the rev's 1,2,3, etc is the wrong way round in the enhanced attribute box. So when i click and start typing i end up with 3,2,1 in the rev boxes. i hope this makes sense and someone can fix this annoying error i have.
  6. Hi, I'm just trying my hand at learning to create some dynamic blocks, but need a solution to keep the text unrotated. I have attached a file of my troublesome file for you experts to look at, if possible. PileTest.dwg The file is basically a plan view of 4x foundation columns for overhead line towers (pylons). These towers can be different sizes and at different orientations, hence the dynamic options I have applied. However, when I rotate the block I want the text to rotate with it (to keep aligned with each column A, B, C, D), but I don't want rotation to be applied to the text, if that makes sense? Any ideas on the best way to achieve this? I have a feeling that constraints might work, although I know nothing about them, but these usually lag my PC. At present I am having to explode the block and apply a 0 rotation to all the text.
  7. How can we find a missing number from a number sequence in a text layer using Autolisp. For ex- 1 2 3 4 6 7 in the above sequence 5 number is missing. so we should find 5 and zoom in to its nearest number as 4. Actually we need it for parcel numbering where no number should be miss.
  8. Hey All, If you are familiar with the "Fields" associated with text attributes, you may be able to answer my question.. If you set up a date to fill-in automatically when you open a drawing, will it update from day to day? Or once its set up, will it remain on that date..? Please let me know if i am unclear..
  9. Hello, I need to create some texts using the following command in VBA: ThisDrawing.SendCommand ("Text" & vbCr & "10,10,0" & vbCr & vbCr & vbCr) But, I must enter the text manually. I want to enter the text programmatically. How? Thank you
  10. Does any body have any idea how can we find out the Text and Polyline intersection location using Autolisp? It will be better if we can mark error circles on a perticular layer on the intersection. Thanks in advance
  11. I was working on one of the existing cad drawing, i came across this problem. I tried to match my Mtext with the existing text style, after M.P (match prop) everything look the same except the fonts style would not match, why is that? Does it have to be on the same layer? Thanks
  12. Hi, I am very new to lisp and AutoCAD with no previous experience. I am working on a project which I’m finding pretty difficult. What I am trying to do is import attributes and properties associated with a sphere from a .csv file into the corresponding property set in AutoCAD. I found a solution online which will allow me to import the coordinates (x,y and z) and this works a treat. However, I am having difficulty trying to import attributes associated with the sphere into the extended data property sets. So say for example, I am trying to import the week number, a reference and a description in from the .csv file into AutoCAD, under properties and extended data. Would anyone have any guidance or direction they could give me? Anything at all would be greatly appreciated. Thank you in advance!
  13. Just seeing if someone knows how to change the DTEXT command to be typed on a specified layer. I have poked around and came across some macros editing but this did not do the trick. Super thanks in advance! [&DText]^C^C-layer;s;TEXT;;dtext;
  14. Problem: When I print to PDF from AutoCAD 2013, some text is plotted with extra lines. Some letters are double printed (see attached image). This happens on my coworkers' machines as well (they are running AutoCAD 2010). I have used: AutoCAD's internal DWG to PDF option Bluebleam PDF CutePDF Writer Adobe PDF It happens with both MTEXT and DTEXT. CTB file is consistent between the file and the plotter. I have not altered the pens, linetypes, etc. Any help would be greatly appreciated!
  15. Hi there, My coworker who does not have AutoCAD is trying to find text in a 250 page PDF that I am 98% sure came directly from a DWG. When we search for the text in the basic search command in Acrobat Pro we get nothing. Is there a way for Acrobat to identify the text or mtext as characters, not pixels again and search within those pages to find the text? And yes, it does occur at least twice in the doc that we have noticed. I'm on Adobe Acrobat 9 Pro and he is on Adobe Acrobat 11 Pro. If needed for very short term purpose, I have AutoCAD 2013 MEP. Thanks
  16. Does anyone know how to make txt orientation match layout without also having annotative scales. I need the txt to be a fixed size according to other drawing objects in different viewports -with different scales - and with different orientation. Sorry for writing messy. Hope someone can help:cry:
  17. We've been fighting with this and the conclusion we've come to is that it's an autocad problem and there's nothing we can do about it. We have detail drawings that contain horizontal and vertical dimensions. They're drawn at full scale in model space and saved as individual drawings. We then insert them as blocks onto a sheet in paper space, scaling them down to 1/2", 1/4" scale ETC. Here's the problem - all the vertical dimension text appears bolder than everything else when scaled down. Horizontal text is just fine, diagonal text also looks a little bolder though. It seems that it's just a quirk of autocad that it does that.
  18. Hello everyone, I have a problem drawing text in a complete circle in AutoCAD (version 2012), I used "Arctext" but the letters don't seem to stay at a even space between them... it's not a very good end result :-( Does any one know a different command or lsp that I can use to do this in a more perfect manner? Thanks in advance, Castro
  19. For starters, I am using AutoCAD 2013. I am having trouble with changing the text height of attributes in a block. I know that I can normally use BATTMAN and ATTSYNC to change the text height, but those are not working in my case. I am using a point parameter and STRETCH action to enable my attributes to be moved, while the main object stays in place. When the attributes are not tied to the point parameter and I use BATTMAN in the block editor, the block will insert with any changes to attribute text height. When they are tied to the parameter and I use BATTMAN in the block editor, the block will insert with the attributes at the text height that they were created at. The only way I can change the text height is to use BATTMAN in model space. I can work with this, but it would be easier to use BATTMAN in the block editor since my attributes are aligned vertically and changing the text size ruins the spacing between them. It would be much easier to both change the text size and respace in the block editor. Does anyone have any suggestions or fixes?
  20. I have a routine that I'm working on, which is my first attempt using COND and IF, and I'm running into a problem with how to end the routine. Towards the end, I have (IF (EQ YR "N.F.H.A.") (COMMAND "MTEXT" "_non" pt1 "J" "MC" "S" "STANDARD" "H" TH "W" TW L1 L2 "") I need it to skip (setq L3 (getstring t "\nType Flood Panel Number: ")) (setq FD (getstring t "\nType Flood Panel Date \"MM/DD/YY\": " )) (SETQ L4 (STRCAT "DATE " FD)) (COMMAND "MTEXT" "_non" pt1 "J" "MC" "S" "STANDARD" "H" TH "W" TW L1 L2 L3 L4 "")) if the statement is true, otherwise continue on. I'm sure this is an easy fix, I'm just not seeing it. Thanks in advance. here is everything (DEFUN c:LF () (SETQ CL (GETVAR "CLAYER")) (command "layer" "M" "FLOOD" "C" "70" "" "L" "BORDER2" "" "S" "FLOOD" "") (command ".osnap" "NONE") (setq DS (getvar 'dimscale)) (SETQ TW (* DS 1.3)) (SETQ TH (* DS 0.07)) (setq pt1 (getpoint "\nPick Insertion Point: ")) (SETQ L1 (STRCAT "APPROX. LOCATION")) (if (eq (setq ZN (getstring T "\nFlood Zone A, AE or X?: <X> ")) "") (setq zn "X")) (COND ((EQ ZN "A") (setq YR "100")) ((EQ ZN "AE") (SETQ yr "100")) (t (IF (EQ (setq YR (getstring T "\n500 or NFHA? <NFHA> : ")) "") (SETQ YR "N.F.H.A.")))) (COND ((EQ YR "100") (SETQ L2 (STRCAT "ZONE " ZN " " YR "YR"))) ((EQ YR "500") (SETQ L2 (STRCAT "ZONE " ZN " " YR "YR"))) (T (SETQ L2 (STRCAT "ZONE " ZN " " YR )))) ;===============================PAST THIS POINT IS WHERE I'M HAVING THE ISSUE======================================================= (IF (EQ YR "N.F.H.A.") (COMMAND "MTEXT" "_non" pt1 "J" "MC" "S" "STANDARD" "H" TH "W" TW L1 L2 "") (setq L3 (getstring t "\nType Flood Panel Number: ")) (setq FD (getstring t "\nType Flood Panel Date \"MM/DD/YY\": " )) (SETQ L4 (STRCAT "DATE " FD)) (COMMAND "MTEXT" "_non" pt1 "J" "MC" "S" "STANDARD" "H" TH "W" TW L1 L2 L3 L4 "")) (COMMAND "CLAYER" CL) )
  21. I'd like to share something I just discovered. It may be old news to many of you. Select a dimension. Select the text grip. Right click. You'll get a menu for doing some neat things with the text, such as moving it independently, resetting it, and centering it vertically. You can even rotate the dimension. I was trying to move some dimension text because the plan doesn't line up with the UCS. Either the text was upside down (reading left to right) or on the wrong side of the line (reading right to left). This beats exploding the dimension!
  22. Does anyone know of a way to automatically insert the arc like the picture? Is there a setting somewhere that will do this? Right now when we have a location that cannot accomodate the text we are drawing an arc and grip moving the dim text to the new location. I am trying to find a more automated way to handle these types of situations. Thanks
  23. Another recent text issue from myself... OK, so recently I discovered the TXT2MTXT command and how wonderful it is, but there is one thing missing which would help me out a lot. Is it possible to change multiple texts, but separately WITHOUT having to re-issue the command? I've experimented with some of the in command options, but unless I'm missing something, nothing seems to work. Preferably, I would like it to work like the FILLET -> Multiple command, so I could select a group of texts, convert them then select another group etc, but the 'multiple' option in TXT2MTXT does not work in such a way. So, am I missing something or is there a LISP routine that can help? Thanks in advance.
  24. Hi, I've noticed in AutoCAD 2012 that the MTEXT grips have changed, for example, MTEXT justified to 'middle centre' displays just 3 grips, one centrally for moving and 2 'arrow' style grips for stretching. In previous versions of CAD which I used, the MTEXT would have 5 grips, the additional 2 giving more versatility when placing text. However, when using the TXT2MTXT command the resulting MTEXT will display 5 grips (see image). What I would like to know is if it's possible, perhaps with a system variable, for normal MTEXT to display 5 grips as standard as mentioned above? I've searched the help files and the forum but have found nothing... Thanks
  25. I have some (single box)tables in my drawings that are referencing measurements on my drawing (Insert field:Object:Measurement). Sometimes I have a formula (ie. =measurement+.250) When I initially enter the text/formula, everything works great. When I go to edit (change what dimension I'm referencing, or modify the formula), the text is invisible. I can highlight where the text/formula is, but I can not see what the text says. If I save and reload AutoCAD, the text is there, until I change it, and then again, it disappears if I want to again modify the text. This is driving me nuts when I need to make multiple edits...ideas? Using AutoCAD Mechanical 2011 and Windows 7
  • Create New...