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. Hi, I try to find a dxf files only which is overlapped in multiple dxf files using API. Assist me on this. See the sample dxf. Sample.dxf
  2. Hi, I have thousands of drawings. They are all similar to This.dwg one. My final goal is to merge them into one kml file.. This would take months to do it one by one. If I have the right lisp to automate this in one drawing, then I can use script to run that lisp over other drawings. To reduce the result file size, I decided to keep only the green polyline in the center of the drawing(which matters the most): (defun C:foo ( / varf ins str) ; Selecting Polyline (setq varf (list '(-4 . "<OR") '(0 . "LWPOLYLINE") '(-4 . "<AND") '(0 . "POLYLINE") '(-4 . "<NOT") '(-4 . "&") '(70 . 80) '(-4 . "NOT>") '(-4 . "AND>") '(-4 . "OR>") (cons 62 3) ) ) (sssetfirst nil (ssget "_X" varf)) ; Inverting selection (if (ssget "_I") (progn; then (sssetfirst nil) (command "_.select" "_all" "_remove" (ssget "_p") "") (sssetfirst nil (ssget "_p")) ) (prompt "\nRequires pre-selection."); else ) ; Delete Selection (command "_.erase") ; And This is how I insert Drawing Name (and (or (> (getvar 'DWGTITLED) 0) (alert "Save the drawing then try again!") ) (setq ins (getpoint "\nChoose Insertion Point: ")) (setq str (entmakex (list '(0 . "MTEXT") '(100 . "AcDbEntity") '(100 . "AcDbMText") (cons 10 (trans ins 1 0)) (cons 40 0.8);Text height (cons 7 "STANDARD");Text style '(1 . "") ) ) ) (vla-put-textstring (vlax-ename->vla-object str) "%<\\AcVar Filename \\f \"%tc4%fn2\">%}" ) ) ) Now these are what I'm looking for: - I don't want to pick the insertion point manually, need to insert field inside or over selected polyline - after inserting field text, I want to explode the text. to maintain drawing name after merge. - adding a condition to check the process, if anything goes wrong, insert that drawing name at (0,0,0). this way I can track that file to check it manually. Thank you in Advanced.
  3. Ajmal

    TEXT ISSUE

    I am experiencing an issue with mirrored text in my drawings. the "Mirrortext" system variable set to 0, the text still mirrors when I mirror the drawing. I have observed that there are two types of text in the drawing: one type mirrors along with the drawing, while the other type maintains its normal orientation when the drawing is mirrored. I have attached the drawings for reference. Could anyone provide a solution to this problem? Thank you in advance for your assistance. TEXT ISSUE.dwg TEXT ISSUE 1.dwg
  4. Once upon a time, Autocad used to hatch around text objects like this In Autocad 2022 it hatches around the mtext like this It seems to be connected to the text frame. Short of exploding the Hatch, drawing a polyline around the text and trimming, is there a setting or way to hatch like the first example? Another workaround is to explode the mtext first but that is problematic with our standards. Converting back to Mtext adds even another step that we'd prefer not to have to do.. Please advise.
  5. Hi there! I have a lisp that saves a custom variable in my dwg. (the custom tab in dwgprops command) I want to insert that value in a field and manipulate it a little bit, but it's a string. Is it possible to convert it to a float inside the formula box in the field editor? I've tried with autolisp (atof ...) but it's not working. Thanks! Dennis
  6. hello everybody , hope u all are great ... i have this lisp to get sum of some texts in autocad by choosing them one by one , but instead i wanna select those texts in one time by one selection click for them all ... i really appreciate ur help thanks in advance ;; wrriten by dlanorh from cadtutor (defun rh:em_txt ( pt txt lyr sty tht xsf) (entmakex (list '(0 . "TEXT") '(100 . "AcDbEntity") '(100 . "AcDbText") (cons 10 pt) (cons 1 txt) (if lyr (cons 8 lyr)) (if sty (cons 7 sty)) (if tht (cons 40 tht)) (if xsf (cons 41 xsf)) );end_list );end_entmakex );end_defun (vl-load-com) (defun c:t+ ( / *error* sv_lst sv_vals ent elst el num xsf ans tot qflg nlst sel pt txt) (defun *error* ( msg ) (mapcar 'setvar sv_lst sv_vals) (if (not (wcmatch (strcase msg) "*BREAK*,*CANCEL*,*EXIT*")) (princ (strcat "\nAn Error : " msg " occurred."))) (princ) );end_defun (setq sv_lst (list 'cmdecho 'osmode 'dynmode 'dynprompt) sv_vals (mapcar 'getvar sv_lst) );end_setq (mapcar 'setvar sv_lst '(0 0 3 1)) (while (not tot) (setq el (entget (setq ent (car (entsel "\Select First Text Number Entity : "))))) (cond ( (wcmatch (cdr (assoc 0 el)) "*TEXT") (cond ( (= (cdr (assoc 0 el)) "TEXT") (setq num (atof (getpropertyvalue ent "TextString")) xsf (cdr (assoc 41 el)))) (t (setq num (atof (getpropertyvalue ent "Text")) xsf 1.0)) );end_cond (cond ( (zerop num) (setq num nil) (alert "Text Entity NOT a number")) (t (setq tot num))) ) (t (alert "Not a Text Entity")) );end_cond (cond (num (setq nlst (cons ent nlst)))) );end_while (while (not qflg) (setq sel (entsel "\nSelect Next Text Number Entity : ")) (cond ( (not sel) (initget "Yes No") (setq ans (cond ( (getkword "\nSelection Finished [Yes/No] <No>")) ("No"))) (if (= ans "Yes") (setq qflg T)) ) );end_cond (cond ( (and (not qflg) sel) (setq elst (entget (setq ent (car sel)))) (cond ( (and (wcmatch (cdr (assoc 0 elst)) "*TEXT") (not (vl-position ent nlst))) (cond ( (= (cdr (assoc 0 elst)) "TEXT") (setq num (atof (getpropertyvalue ent "TextString")))) (t (setq num (atof (getpropertyvalue ent "Text")))) );end_cond (cond ( (zerop num) (setq num nil) (alert "Text Entity NOT a number"))) ) ( (vl-position ent nlst) (alert "Already Selected") (setq num nil)) (t (alert "Not a Text Entity")) );end_cond (if num (setq tot (+ tot num) nlst (cons ent nlst) num nil)) ) );end_cond );end_while (cond ( (and tot qflg) (setq pt (getpoint "\nSelect Total Insertion Point : ") txt (if (zerop (rem tot 1.0)) (rtos tot 2 0) (rtos tot 2 3)) );end_setq (rh:em_txt pt txt (cdr (assoc 8 el)) (cdr (assoc 7 el)) (cdr (assoc 40 el)) xsf) (if nlst (foreach o (mapcar 'vlax-ename->vla-object nlst) (vla-delete o))) ) );end_cond (mapcar 'setvar sv_lst sv_vals) (princ) );end_defun
  7. When I am using UCS by object and for that selecting the text it shows Z axis on text. but in the text properties it is not there if I change the value of Z also nothing changing same problem exist. Not only the UCS, when i am using Lee Mac Align Text to Curve it is not coming properly. for that I am fixing the problem am using Lee Mac Text2MText Upgraded with single selection or explode the text and making again Text2MText. while flattening the text is self-exploding. for this how can i remove all text z axis value at single time.....???? Test.dwg
  8. Hi, I would like to know some help. 01 - Is there a possibility in this Lee Mac lisp, Automatically Label Attributes, that it can be changed so that every time I open a different file it asks me about the increment, prefix and suffix settings? Because in the current way it always loads the pre-configuration that is already in lisp. I don't want to have to edit the lisp to configure the numbers for each file. Note: I use attributed blocks and multileader blocks. 02 - I also use the Lisp Incremental Numbering Suite, I would like to know if the option for multileaders can be added. As the current options are only for text, mtext and blocks. For my use multileaders are more interesting. Because the use of block with attributes will have to be manually making the leader lines to indicate their positions and references after their insertion and when you have many blocks end up wasting valuable time. I would like to know if it is possible to make any of these changes, since lisps have many lines. Note: Sorry for the google translation. #NumIncV3-9.lsp AutoLabelAttributesV1-4.lsp
  9. hello everyone , hope u all doing so great ... my problem here that i want easy way to insert numbers in autocad without trying to make texts or adjust them .. i wanna lisp make the number i press from keyboard be inserted into text or mtext and i just click the location of that text in cad ... hope somebody could help me in this ... thanks in advance
  10. I re-opened a dgn I haven't touched in months and when I started looking at the text all of the labels/text changed their style to 'Fancy'. I opened up other dgn's from different projects and every single one is 'Fancy' text. I recently updated Microstation (update 15) but not sure if this has anything to do with it. Is there anyway to revert these text changes?
  11. please refer the attached cad file below. on the left is output text given by software at specific x, y distance from center of the circle. i need a lisp routine that will produce results similar to what i have mentioned on right side so that drawing will be easy to read. i have done this manually, but it will take days to complete like this as area is too big. THE TEXT SHOULD NOT OVERLAP TO EACH OTHER AS WELL AS NEARBY POLYLINES. Please help ASAP. Thank You. Drawing1.dwg
  12. I saw this autolisp from Lee Mac on this forum, this lips routine allows to change existing text to anything instantly, i would like to know if any body wants to help me to make this lisp routine to select top text and change it then select bottom text and change it instantly too, thank you very much in advance, I have # at top of pipe reducer and a # at bottom of the reducer too, so I need to type 330 and click on the # top text and change to 3" then click on the bottom # and changed to 300, thank you again from Mr, Lee Mac but it work only on one text at the time. (defun c:req ( / ent enx ) (while (progn (setvar 'errno 0) (setq ent (car (entsel))) (cond ( (= 7 (getvar 'errno)) (princ "\nMissed, try again.") ) ( (null ent) nil) ( (not (wcmatch (cdr (assoc 0 (setq enx (entget ent)))) "TEXT,MTEXT")) (princ "\nPlease select a text or mtext object.") ) ( (entmod (subst '(1 . "REQUIRED") (assoc 1 enx) enx))) ) ) ) (princ) )
  13. I found valuable lisp for auto creation block. I want to improve this lisp to following requirement * block selected object individually, not in one block thanks AUTO-BLOCK.LSP
  14. Lippens Infra

    shorten text string

    Hello all, I have a file where the height of certain points is annotated as text. The precision is 0.0001 which is too much. I have like for example a text line containing 13.6489. Would it be possible to adapt all text entities at once? and maybe even a correct round off? If i could shorten the string to 13.64 that would be ok, but even better would be 13.65 If not, there are also blocks (crosses) which have the height as Z attribute. Is it possible to extract that Z coordinate and annotate it? Thanks in advande
  15. Hi all. I hope everybody is safe during this Covid-19 pandemic. I need some help. How do i move the text (BEFORE picture) and create a new line? The distance between the text is fix or as long as user can read it. How do i create the lines? I'm new to Autolisp, so please avoid giving example in Visual Lisp (vlx). Thanks.
  16. Hello Everyone! I am using vanilla AutoCAD 2017. I have recently done a hydrographic survey, so I have a drawing full of depths (text). Wondering if anyone can point me to a lisp routine that can color code the text based on a range. For example any depths between 10 and 20 is green or any depths between 20 and 30 are red. Thanks in advance.
  17. Hi to all. I've learned alot from this forum and i manage to make a lisp by reading this forum. But for this matter (refer image), i have no idea how to do it. I know about GETDIST to get the distance (setq Dd (getdist "\nPick first point)) and it will print out 30. 1. How do i make a line with length (user input) with datum of a value (user input)? 2. How do i created the text ( distance, level and additional text such as cut area) under the line? Let say i want to enter the length (or height?) as 20.0 with a caption. I want to enter the value and caption with a comma between the word (e.g: 20.0,borderline). 3. If i only enter only the value (no caption), how do i use the value ( car, caddr ?) and LISP will still accept it. 4. How do i space the gap between distance (0.00) and height ( 20.0). 5. Should i use GETPOINT fot the first point or straight away GETDIST to create the text? Thank for your answer and time. I've no knowledge on VL@ActiveX, can you please guide me using non VL sample.
  18. 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.
  19. 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
  20. 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
  21. 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.
  22. 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.
  23. 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..
  24. 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
  25. 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.
×
×
  • Create New...