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. 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.
  2. 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.?
  3. 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
  4. I'm looking for a lisp command that can quick swap text between two objects, be they text, mtext, or multi-leader text. So upon running, you click on the two objects, and the text from object A moves to object B, and the text from object B moves to object A, where object A and object B can be different object types.
  5. 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
  6. Hello, Does anyone know of a LSP out there that will number the selection below properly without editing each piece of text?
  7. Hello, Is there a LISP to make text middle justified?
  8. ryankevin15

    ..........

    .....
  9. 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
  10. 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
  11. 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
  12. 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.
  13. Hello, I have created a table within AutoCAD. I have written some words in cell "A1", I would like to display the same words in another cell using an equation "=A1". When I type the "=A1" equation the cell displays "####" Is there anyway to make this work? possibly using fields? Thanks
  14. 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
  15. Has anyone seen or head of this error before, and does anyone have any suggestions on how to stop it happening. It does seem to be a random occurrence. When I plot to PDF the letters are coming in rotated about 90 degrees. No Idea why.
  16. I'm about to receive a bunch of borehole data for a bigger project with x,y coordinates in state plane for each hole and I believe it will be sent as an Excel file. I'd like to add a center-justified text consisting of the borehole name at the x,y coordinate where it should go so I can quickly check out the location of a hole and then look up its other properties by name in the Excel sheet. So far, I'm thinking about concatenating the cells and adding spaces in a separate column in excel so that for each hole I have something like: text j mc 0 x-coordinate,y-coordinate BH120 in a single cell. That way I can copy and paste that line at the CAD command prompt and skip a ton of key strokes going through the text options. I've done a similar workaround, inspired by someone here on the forums, when working with line segments where clients have sent me endpoints in Excel format. It's been great because it's transparent enough that I can forward my spreadsheet on to any one of my coworkers and have them duplicate the process without having to worry about a couple of people in my work group who only have LT and can't use LISPs (I think?). The difference is that while you can exit a line command by putting a space after that entry above, I think the only way to end the text command might be by pressing enter twice and I don't know if there's a way to just concatenate a couple of enters at the end of a line like I can a couple of spaces. The question is, is there a quick cheat that would let me do everything by copying and pasting multiple lines formatted as above all at once from excel without having to press enter after each hole? Is there an arraypath type command that's more well-suited to this instead, since I do have x,y coordinates?
  17. I've been trying to find existing lisp routines to do the following for a while now (off and on). While I have found some that will change values of Attributes or the text width for every piece of text in a drawing, that is not what I need done. I need a lisp routine that will be manually modified with the current Attribute TAG and Block name based on client titleblock. It can't require manual selection (user input) as this will be used in a script to batch run the lisp routine. To kind of summarize, I would like the ability to specify a block name and attribute tag name (in the specified block) and be able to set the text width factor in the drawing to account for longer filenames per client requests. This is only for the 1 attribute in all drawings. Any help will be greatly appreciated. Here is an example: Titleblock has: Attribute: File name TAG: DRAWINGNO Value: Linked to actual filename with a field Current text width factor is .8 and it needs to be .7 to fit within the titleblock space.
  18. HI THERE! AUTOLISP FOR Copy of data from excel to acad.xlsxIN TEXT 90DEG ROTATED, NEED A AUTOLISP THAT CAN FUNCTION TO CREATE PARTIAL DISTANCES(0.000.000), CUMULATIVE DISTANCE(0+000.000) BASED ON THE LENGTH BETWEEN THE EACH VERTEX OF THE POLYLINE (APPROX. 3.69KM), PLEASE FIND THE ATTACHED DRAWING, THANKS IN ADVANCE PLEASE HELP, CREATE A LISP FOR PL.dwg
  19. Hi guys, Attachment: Test Drawing.dwg I want to retrive the text's content, the text is placed at a certain XYZ co-ordinate in Autocad, (same coordinates, always for all the drawings). [Refering to the attachment]: The text below the "Surface Area" and the "Weight", are mostly the texts i'm trying to get. These texts sometimes come as a single line text or as a mtext or within blocks.. but always they appear at the same coodinates. Can somebody help me with this?
  20. Hey guys I found this LISP routine that allows me to change text in a drawing to anything I specify. Works great, however. My question is how do I code in here so the text updates dynamically as I click on them, instead of dashing them and waiting for user to hit enter for the changes to appear. (defun c:req ( / v1 v2 v3 newtx nme oldtx) (setvar "cmdecho" 0) (prompt "\nPick text to be changed.") (setq v1 (ssget '((0 . "TEXT")) )) (setq newtx "REQUIRED") (setq newtx (cons 1 newtx)) (setq v2 0) (if (and v1 newtx) (while (< v2 (sslength v1)) (setq nme (ssname v1 v2)) (setq oldtx (assoc 1 (entget nme))) (setq v3 (entget nme)) (entmod (subst newtx oldtx v3)) (entupd nme) (setq v2 (+ v2 1)) ) ) )
  21. Hello. I'm looking for a way to draw a polyline, where i enter the points with mouse clicking and when i click the final point and enter button, it writes in text the total lenght of polyline. I know that i can go to the properties and see the total lenght of the polyline and then i can use mtext to write that value near my polyline, but because i have to do that more than 1000s times, i was wondering if there is a faster way or a lisp routine. All ideas are welcome. P.S. I'm using Autocad 2009 and i'm beginner/medium user. Thank you
  22. I have some drawings which contain hundreds of numbers (example: 1-218b), each of which is on geometry which will be written as a block into its own folder. I am trying to write a Lisp that will create all of the folders based on the selected text. I have found a few posts about writing a directory, but it's all super confusing to me. General routine process: 1. Get selected text objects 2. Prompt for directory to create new folders in 3. Create a folder for each selected text object, named based on the text It's ok to assume that the text is already selected when the Lisp starts. If no text is selected, I'd just send an error message to the console and end the routine. It's preferable that the directory prompt is GUI based so that I can navigate to the directory, but I am absolutely clueless here. If needed, I can just copy and paste the directory path into the console. The routine doesn't have to work with MText. The files contain only single line text. If I can get any code working, I'll post it, but I think it's going to take a good long while.
  23. Hi there all First post and it's a request for help (although been a long time lurker) I've got a 3d drawing that has a load of levels in 3d positions with text displaying the height value. These are all orientated and readable in plan view. I want to create some sections using the 3d information, and what I would like to work out is the best way to manipulate the level cross (block) and associated text so that it is rotated to a side on section view. (in model space not just in a paper space viewport) I've tried using the rotate3d command on mass and can't quite get the results I'm after, basically it rotates the text so that it is now readable in the section but when selecting multiple items it rotates the whole lot around one datum rather than rotating each item around it's own insertion / justification point. in the above image, to the left is what I'm starting with levels (red) in 3d - next is the result I get from using the command rotate3d (levels in white) when they are selected in one go. the text is rotated so that it's legible but has moved away from the 3d polyline - the 2 to the right show what i'm aiming for, having manually moved them to their representative points and then rotated, however there's gonna be quite a few to rotate and shift along different sections, so it would be good to have this a bit more automated any suggestions? am I not using rotate3d to it's full potential or is this something that would need to be solved with a lisp routine? picking a temp ucs along the section line and then selecting the relative objects to rotate thanks in advance
  24. Currently, I have an Excel table. Numbers of column contains 0 or 1. I have to copy column by column into notepad and then copy the notepad contain to CAD. After that, I have serval individual column of Mtext. Then I further explode them into text. A numbers of individual text are pasted on CAD and this is what I want. However, if I do copy multiple column into notepad, the result is a whole Mtext which is containing all columns. I explode the Mtext and I will obtain multiple line of text. I am searching for a lisp to convert/separate Mtext to individual text. For more advance, I want these 1 and 0 located in different destination point from excel to CAD by a lisp.
×
×
  • Create New...