Jump to content

Search the Community

Showing results for tags 'text'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • 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

Categories

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

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

  1. I have this block of text as you can see in the image below, and in the window show me this "VIGA V-SS01 (.25X .50)", BUT I DONT WANT THAT SHOW ME THIS. I want to the program ask me a question first, for example: What is the name? so I will set the answer of this question in the block I have. SO, I want to have this in the window "VIGA V- (AND THE ANSWER OF THE QUESTION)" EXAMPLE: Computer: What is the name? User write: L22 Then, that will show me: "VIGA V- L22" I will glad if you can help me, If you have already notice, I dont know to much about the topic.
  2. Im beginner, I have this: (setq p1 (getpoint "\nPunto Inicial:")) (setq p2 (polar p1 (* 1.5 pi) 0.5)) (entmakex (list '(0 . "line") (cons 10 p1) (cons 11 p2) '(62 . 2))) So, the line I drawn is the yellow one below in the image. And, the text I want put is the magenta one. how can I do this? Thanks for your help
  3. I would like to modify this lisp script so that the dimension has a centered text instead of on a side of the dimension. But i don't know how. (defun c:HD (/ HD_LineHouse HD_LineProperty HD_Point1 HD_BasePoint1 HD_Text1 HD_Point2 HD_BasePoint2 HD_Text2 HD_ActiveDoc HD_ActiveSpace) (if (and (setq HD_LineHouse (car (entsel "\nSelect house line : "))) (setq HD_LineProperty (car (entsel "\nSelect property boundary: "))) (= (vla-get-ObjectName (setq HD_LineHouse (vlax-ename->vla-object HD_LineHouse))) "AcDbLine") ) (progn (setq HD_LineProperty (vlax-ename->vla-object HD_LineProperty)) (if (not (vl-catch-all-error-p (setq HD_Point1 (vl-catch-all-apply 'vlax-curve-getClosestPointTo (list HD_LineProperty (setq HD_BasePoint1 (vlax-safearray->list (vlax-variant-value (vla-get-StartPoint HD_LineHouse))))))))) (progn (setq HD_Point2 (vlax-curve-getClosestPointTo HD_LineProperty (setq HD_BasePoint2 (vlax-safearray->list (vlax-variant-value (vla-get-EndPoint HD_LineHouse)))))) (setq HD_Text1 (polar HD_Point1 (angle HD_BasePoint1 HD_Point1) 0)) (setq HD_Text2 (polar HD_Point2 (angle HD_BasePoint2 HD_Point2) 0)) (vla-StartUndoMark (setq HD_ActiveDoc (vla-get-ActiveDocument (vlax-get-acad-object)))) (vla-put-TextPosition (vla-AddDimAligned (setq HD_ActiveSpace (vla-get-Block (vla-get-ActiveLayout HD_ActiveDoc))) (vlax-3d-point HD_BasePoint1) (vlax-3d-point HD_Point1) (vlax-3d-point HD_Point1)) (vlax-3d-point HD_Text1)) (vla-put-TextPosition (vla-AddDimAligned HD_ActiveSpace (vlax-3d-point HD_BasePoint2) (vlax-3d-point HD_Point2) (vlax-3d-point HD_Point2)) (vlax-3d-point HD_Text2)) (vla-EndUndoMark HD_ActiveDoc) (mapcar 'vlax-release-object (list HD_ActiveSpace HD_ActiveDoc)) ) ) ) ) (princ) ) HD-Automatic Dimension.LSP
  4. Hi guys & gals, I came across a very repetitive problem. While working with a certain type of software data is output to *.dxf as set of 3D polylines and text. From the level of software I work with, I cannot configure any text formatting details. Hence an idea to ask You few questions. 1. Is there any way of rotating text based on azimuth of a 3Dpolyline which lies within 0.3m distance from the text base? Did someone ever came across LISP of this type ? 2. is there any other (more effective) way than OVERKILL to get a rid of duplicated text ? Thank you in advance ! Regards, Adam, Geophysicist.
  5. I have a block with about 60 single-line text entities, 40 of which have a place holder character that needs to change based on how the block is used. For example, "~1a" and "~1b" need to change to "P1a" and "P1b", where "~" is the place holder and "P" is the letter for this 1 block. The next instance of the same block will need a different letter. This is not a good application for attributes. I found Lee Mac's LISP c:ReplaceBlockText in this thread using vlax-for, but it appears to work on the block definition and changes the text for every instance of the block in the drawing. I need this to work on 1 selected instance of the block. Any help is appreciated, even if it's a point in the right direction.
  6. Hi Writers! here i am again with new question. I am looking for a lisp to Offset line by a selection set values. i really wanted to get an intersection point after offsetting so that i can draw circle at each intersection. but i have values till outer of circle, i know the radius of circle. Process may be like this. Select Values Get Circle radius from user add with selected values select Line offset in positive direction by added values repeat once to offset another line. please help me to find a lisp. Thank you..
  7. Hello, In this DWG i need to pair text (which is room function) with block attribute "FUNCTION" that i've created. I can do this manually but it's over 1000 blocks ,so that make me wonder is it possible to create LISP which take nearest text into block attribute. I've found that LISP (https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/add-text-value-to-a-block-attibute/td-p/7949545) but it's swaping texts over rooms for example in room where laboratorium is located it name it biuro which is located next to it. Sorry for my plain english, I'm not native speaker. Thanks in advance! test_1.dwg
  8. Hi, I have recently come up with an idea for a project. And to execute that idea i need to be able to read trough a DWG and perform calculations based on the dimensions of walls, windows, doors and stuff like that. Is there anyway i can save a dwg of a floor plan in some kind of text format so i can write a program that is able to read trough it and identify those elements and perform calculations based on those dimensions? Thank You.
  9. BrianTFC

    Text fit lisp

    Hi All, I was wondering if there was a lisp routine out there that when you drop a dtext string into a rectanlge that it would shrink down to fit inside? I looked at the text fit command in the express tools but it only shrinks or stretches the length. Thanks, Brian
  10. Hello, Could you help me with the following question? I would like to filter all the texts and multileaders at Z=0. I could solve it for texts by using the following code, but it does not work for multileaders when I simply change TEXT to MULTILEADER. How could I do it? (sslength (ssget "X" '((0 . "*TEXT") (-4 . "*,*,=") (10 0.0 0.0 0.0)))) Thanks a lot, Cs.
  11. Hopefully I am just unaware of a setting or method for doing this but so far the field command is handy but missing something. Associative updates. When a polyline is drawn and used for calculating the area the field command does a quick job of extracting that info into a field text element. Problem is when that polyline boundary is changed the "field text" that was established previously does not update. Is this even possible or am I S.O.L.?
  12. Hello, I am looking for a .lsp that will allow me to insert a titleblock of a different size and run a command on the existing titleblock and click on the new titleblock and it will retain all the same information (even with text fields) and copy over the information into the new titleblock without having to fill out the new titleblock. Our titleblocks use mostly fields but the project name, address, drawing number and drawing name have just regular attribute text objects. This would be a huge time saver if I have to take something that was originally on a 22x34 titleblock and resize the viewport and insert a new 8-1/2x11 titleblock quickly without having to re-enter all of the information. This would be a tremendous time saver! Thank you in advance
  13. Hello all, I would like to know if anybody has any bright ideas about a problem I face when drawing building elevations in 3D. I use 3D polylines to survey a facade on site. When back in the office I get an output of a 3D polyline with a point and node at each surveyed point. The point is aligned to 3d *top* view. I then rotate the current view aligned to the required building facade. My question is twofold: 1) Is there a way of rotating the point to see the point style in the current view? 2) As my point information plots in 3D as point, point number, and elevation is there a lisp routine to rotate the point number text and level text about the centre of the point to present as 'correct' in the current view? I don't expect miracles or written LISP routines but a couple of pointers would be really appreciated. Lownote
  14. Hello, I try to find a lisp that will search and replace text within a user selection. This piece of code that I found on a very old forums on the net do almost exactly what I need. The only issue is I want to replace single word inside sentence and this code replace the word only if it's alone. (defun c:TRANSLATE() (command "cmdecho" "0") (command "_.undo" "begin") (setq mylist (list (list "APPLE" "PEAR") (list "BANANA" "STRAWBERRY") ) ) (setq sset (ssget '((0 . "TEXT")))) (setq i 0) (while (< i (sslength sset)) (setq obj (ssname sset i)) (setq str (cdr (assoc 1 (setq lst (entget obj))))) (princ str) (princ "\n") (foreach item mylist (if (eq str (nth 0 item)) (progn (setq newstr (nth 1 item)) (if newstr (entmod (subst (cons 1 newstr)(assoc 1 lst) lst)) ) ) ) ) (setq i (1+ i)) ) (command "cmdecho" "1") (command "_.undo" "end") ) Can someone modify it to make it work for me? Thank you
  15. Hello, Is there a LISP to make text middle justified?
  16. Hello, Does anyone know of a LSP out there that will number the selection below properly without editing each piece of text?
  17. Hi all, I need some help with a lisp routine that I'm attempting to write. What I need to do is extract a panel label by selecting the text and then select the dimensions that I need extract, I've managed to extract the dimensions correctly but when the information is extracted I get is "nil" in the first cell where the panel label should be and the dimensions in the next to cells. I don't Have Excel on my workstation so I have to use CSV file, I've already wrote an extraction code to run in Excel to retrieve the information in the CVS file. Also is there a way to save the CVS file in the same location that I have the drawing open? If someone could help me I would appreciate it. (defun c:test( / s tx fn i d dl m file) (setq ss (ssget '((0 . "*text,*DIMENSION"))) fn "f:\\BrianD\\Dims.csv") (repeat (setq i (sslength ss)) (setq d (ssname ss (setq i (1- i))) dl (entget d) m (cdr (assoc 42 dl))) (setq tx (cons m tx))) (if tx (progn (setq file (open fn "a")) (write-line "" file) (foreach ss tx (princ ss file) (princ "," file) ) (if file (close file)) ) ) ) (princ) Thanks Brian
  18. ryankevin15

    ..........

    .....
  19. Hi, I am super stressed! I can´t figure out why nothing is happening when I am trying to connect borders with text while making a regulation plan for a land-use area! I Am a surveying student. I posted my question in another forum (autodesk) but the replys stopped comming in and there is no answer yet. In this forum I uploaded pictures and a attempt of better explaining my problem. Please look at the link and reply if you think you can help, I am desperate, I don´t know if I am doing something wrong or if its a software problem or what LINK: https://forums.autodesk.com/t5/autocad-forum/autocad-problem-connecting-border-with-text/m-p/7076026/highlight/false#M878986
  20. Hello, Let's say we have a group of integers as text in dwg. How would we put them in in ascending order by one(+1) starting from a given integer? Let me give an example to make it clear. Let's say we have the texts 1 2 5 5 5 8 9 11 11 15 and the given start integer is 6. We select them all together and the range in selection set is random. Let's say 5 2 8 15 1 5 5 11 9 11. Now, we want to put them in ascending order by one starting from number 6 replacing the "old" range with the new. In the end we must have this: 6 7 8 8 8 9 10 11 11 12. That is 6(in place of 1), 7(in place of 2), 8(5), 8(5), 8(5), 9(, 10(9), 11(11), 11(11), 12(15). I hope it is clear. How would we do that in an efficient way? Thank you in advance, Kostas
  21. I am so close to getting this code to perform but need some final touches and manipulaton.. Currently it offsets all text on a specific layer and copy's and moves it up "0.15" which is what we already have doing with another layer we use in our drawings. (we use this to add specific descriptions above a labeled point.) What I am looking for now is to change the code so that instead of offseting/copying/moving every string of text on DEFICIENCY layer within the drawing, I would like for it to prompt me which individual string of text I would like to offset - i.e. ("\nSelect Text to Offset: "), THEN after I make that selection it offset/copy/move that string up "0.15" and be put on DEFICIENCY layer with its respective properties... Hoping someone can chime in soon and thank you all for the support!
  22. benhubel

    Reverse Numbers

    I regularly use text to number objects for designating cut order. In the past, I have cobbled together some code that can quickly increment or decrement all selected numerical text in case I make a mistake and/or have to change something. This works marvelously, but often, I find that I need to go beyond that and completely reverse the order. Using this code as a starting point, I thought this would be super simple but the fact that I'm trying to do list manipulation to text objects is completely throwing me off. I'm still a bit new to this sort of thing. I was thinking I'd get a list of all selected text, sort it, then reverse that list before applying changes to the text. Highest number gets swapped with the lowest, second highest with second lowest, etc. ("1" "2") would become ("2" "1") ("2" "1" "4" "5" "3") would become ("4" "5" "2" "1" "3") ("2" "8" "17" "4") would become ("17" "4" "2" "8") ("3" "5" "-4") would become ("3" "-4" "5") I'm not sure where to start, nor what process to use. My main problem is that I can't figure out how to sort and edit the data without losing links to the correct text objects. Any help would be awesome. Here is the my quick increment/decrement routine that I'm trying to start with. ;Quick Increment/decrement ;Increments/decrements all selected text integers by 1 ;I hacked this code together with help from an "increment in range" routine. ;Original code can be found here https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/incriment-numbered-text/td-p/3614646?nobounce ;Quick Increment (defun C:qi (/ textselection textobject old) (vl-load-com) (setq textselection (ssget '((0 . "TEXT")))) (repeat (sslength textselection) (setq textobject (vlax-ename->vla-object (ssname textselection 0)) old (vla-get-TextString textobject); initial text content ); setq (if (and (= (strlen old) (strlen (itoa (atoi old)))); text represents integer ; Blocks e.g. "12A", "4.5", "C37", and completely non-numerical ; text [except for next test], but allows negative integers. ; Also disallows e.g. "06", "008", so if those should be included... (if (= (strlen old) 1) (wcmatch old "#") T) ; blocks single non-numerical character e.g. "A" [passes prior test] ); and (vla-put-TextString textobject (itoa (+ (atoi old) 1))); replace ); if (ssdel (ssname textselection 0) textselection) ); repeat (princ) (setq sel1 (ssget "P")) (sssetfirst nil sel1) ); defun ;Quick decrement (defun C:qd (/ textselection textobject old) (vl-load-com) (setq textselection (ssget '((0 . "TEXT")))) (repeat (sslength textselection) (setq textobject (vlax-ename->vla-object (ssname textselection 0)) old (vla-get-TextString textobject); initial text content ); setq (if (and (= (strlen old) (strlen (itoa (atoi old)))); text represents integer ; Blocks e.g. "12A", "4.5", "C37", and completely non-numerical ; text [except for next test], but allows negative integers. ; Also disallows e.g. "06", "008", so if those should be included... (if (= (strlen old) 1) (wcmatch old "#") T) ; blocks single non-numerical character e.g. "A" [passes prior test] ); and (vla-put-TextString textobject (itoa (- (atoi old) 1))); replace ); if (ssdel (ssname textselection 0) textselection) ); repeat (princ) (setq sel1 (ssget "P")) (sssetfirst nil sel1) ); defun
  23. Hi, I have a 3D point (X,Y,Z) and label. This point and label have the same 2D base point (Xp,Yp = Xl, Yl). And there is not a block. Is it possible to export point number and coordinates to text file (with space as separator)? I attached image with an example. Thanks for any assistance.
  24. Is there a command or a LISP (I have checked out LEE's but to no avail from what I found) that I can run say that will allow me to select text and then select a line and it be parallel with it? I know the command TEXT ALIGN but this doens't do what I am looking for, that, or I just don't know how to properly run the command? Any who, as always, thank you for any and all input. Miller
×
×
  • Create New...