Jump to content

Search the Community

Showing results for tags 'mtext'.

  • 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. Help, I keep getting this stupid error no function definition even though I have clearly defun it in my lisp. (defun ISOCP3TEXT () (command "-style" "isocp3" "isocp.shx" "3" "1" "0" "no" "no") ) (defun ISO3 () (ISOCP3TEXT) (setvar "clayer" "0") (setq pt1 (getpoint "")) (initdia) (command ".mtext" pt1) ) (defun c:meh () (ISO3) If you are wondering, I am using meh which may seem redundant but in my main source code, I actually need to call up iso3 due to a dialog box settings thing. For some reason, when I try to run meh, I keep getting ; error: no function definition: ISO3 when clearly I do have a defined function ISO3. Help please.
  2. I have a Detail Bubble dynamic block with MTEXT. Every time I use the Reference Manager, the MTEXT does not show up at the original location. I couldn't upload the pic to show what I mean.
  3. I have the command syntax in my lisp file to create a splined Mleader but I when I try to add text to the Mleader using the Mleader settings, I end up getting text at the landing. How can I put the text at the arrowhead?
  4. I have ALMOST 1000 unique mtexts. I want to append a second line, with the same text, to ALL of them at once. All the current mtexts are different, with different character lengths, so I cannot use 'find and replace'. However, they are are all on the same layer and easily selectable as a group. Is there an easy way to do this? Lisp or otherwise? i.e. originals: "12345" "abcde" "..." desired results: "12345 HOUSE" "abcde HOUSE" "... HOUSE" Thanks
  5. Lee, In your Match Text Properties program you mention.... Not sure HOW or WHERE to do this. Looking to do Height, StyleName, Scalefactor, Linespacing Factor. Program as written is not working on the drawing that I am trying to change. It was converted from VISIO if that matters. Please advise. ;;---------------=={ Match Text Properties }==----------------;; ;; ;; ;; Prompts for a selection of Text, MText, Attribute, or ;; ;; Attribute Definition object to use as property source, ;; ;; then proceed to match those properties listed for similar ;; ;; objects selected thereafter. ;; ;;------------------------------------------------------------;; ;; Author: Lee Mac, Copyright © 2010 - www.lee-mac.com ;; ;;------------------------------------------------------------;; (defun c:MTP nil (c:MatchTextProps)) (defun c:MatchTextProps ( / *error* _StartUndo _EndUndo _GetTextInsertion _PutTextInsertion Props doc entity object ss ) (vl-load-com) ;; © Lee Mac 2010 (setq Props '( Alignment AttachmentPoint BackgroundFill Backward DrawingDirection Height Layer LineSpacingDistance LineSpacingFactor LineSpacingStyle Linetype LinetypeScale Lineweight ObliqueAngle Rotation ScaleFactor StyleName ; TextString Thickness UpsideDown Width ) ) (setq doc (vla-get-ActiveDocument (vlax-get-acad-object))) (defun *error* ( msg ) (if doc (_EndUndo doc)) (if mutt (setvar 'NOMUTT mutt)) (or (wcmatch (strcase msg) "*BREAK,*CANCEL*,*EXIT*") (princ (strcat "\n** Error: " msg " **"))) (princ) ) (defun _StartUndo ( doc ) (_EndUndo doc) (vla-StartUndoMark doc) ) (defun _EndUndo ( doc ) (if (= 8 (logand 8 (getvar 'UNDOCTL))) (vla-EndUndoMark doc) ) ) (defun _GetTextInsertion ( object ) (vlax-get-property object (if (or (eq "AcDbMText" (vla-get-ObjectName object)) (vl-position (vla-get-Alignment object) (list acAlignmentLeft acAlignmentFit acAlignmentAligned) ) ) 'InsertionPoint 'TextAlignmentPoint ) ) ) (defun _PutTextInsertion ( object point ) (vlax-put-property object (if (or (eq "AcDbMText" (vla-get-ObjectName object)) (vl-position (vla-get-Alignment object) (list acAlignmentLeft acAlignmentFit acAlignmentAligned) ) ) 'InsertionPoint 'TextAlignmentPoint ) point ) ) (if (and (setq entity (LM:Selectif (lambda ( x ) (wcmatch (cdr (assoc 0 (entget x))) "TEXT,MTEXT,ATTRIB,ATTDEF") ) nentsel "\nSelect Source Object: " ) ) (progn (setq mutt (getvar 'NOMUTT)) (setvar 'NOMUTT 1) (princ (strcat "\nSelect Destination " (cdr (assoc 0 (entget entity))) " objects: ")) (setq object (vlax-ename->vla-object entity) ss (ssget "_:L" (list (assoc 0 (entget entity)) ) ) ) (setvar 'NOMUTT mutt) ss ) ) ( (lambda ( i values / entity obj ) (_StartUndo doc) (while (setq entity (ssname ss (setq i (1+ i)))) (setq obj (vlax-ename->vla-object entity)) (mapcar (function (lambda ( prop value ) (if (vl-catch-all-error-p (vl-catch-all-apply (function (lambda nil (if (and (vlax-property-available-p obj prop t) value) (if (vl-position prop '(Alignment AttachmentPoint)) ( (lambda ( insertion ) (vlax-put-property obj prop value) (_PutTextInsertion obj insertion) ) (_GetTextInsertion obj) ) (vlax-put-property obj prop value) ) ) ) ) ) ) (princ (strcat "\n** Error Applying Property: " Prop " **")) ) ) ) Props Values ) ) (_EndUndo doc) ) -1 (mapcar (function (lambda ( prop ) (if (vlax-property-available-p object prop) (vlax-get-property object prop) ) ) ) Props ) ) ) (princ) ) ;;---------------------=={ Select if }==----------------------;; ;; ;; ;; Continuous selection prompts until the predicate function ;; ;; foo is validated ;; ;;------------------------------------------------------------;; ;; Author: Lee Mac, Copyright © 2010 - www.lee-mac.com ;; ;;------------------------------------------------------------;; ;; Arguments: ;; ;; foo - optional predicate function taking ename argument ;; ;; fun - selection function to invoke ;; ;; str - prompt string ;; ;;------------------------------------------------------------;; ;; Returns: selected entity ename if successful, else nil ;; ;;------------------------------------------------------------;; (defun LM:Selectif ( foo fun str / e ) ;; © Lee Mac 2010 (while (progn (setq e (car (fun str))) (cond ( (eq 'ENAME (type e)) (if (and foo (not (foo e))) (princ "\n** Invalid Object Selected **") ) ) ) ) ) e ) Thanks Much!!
  6. Hello, thank you for taking the time to look at my post. And thank you all for creating such a useful body of knowledge for beginners like myself to learn from. I have been searching around for a lesson on using MText in AutoLISP (admittedly i have found a few amazing examples) Lee Mac has posted several replies to similar question. sorry for bringing it up again, but these have been over my head a bit. I am hopping someone will take the time to apply the MText solution to the attached Lisp that i currently do understand. It uses the Text Command...I realize using commands is amateurish, but I am still learning ; Northing & Easting labeling ; Ryan Anderson December 2013 ; The Label will use the current Text Style and current Units Settings ; This Lisp borrows ideas from the tutorials I have been working through. ; http://www.afralisp.net/ http://lee-mac.com/ http://www.cadtutor.net/ http://www.cad-notes.com/ (defun c:gln (/ p x y TxtPos) (command "_.MSPACE") (while (setq p (getpoint "Select a Northing Gridline:")) (command "_.PSPACE") (setq TxtPos (getpoint "Pick Label Location: ")) (setq y (rtos (cadr p))) (setq y (strcat "N " y)) (command "_TEXT" TxtPos "0" y "") ; I would prefer to use MText with a backbround mask and an offset ) (princ) ) (princ) (defun c:gle (/ p x y TxtPos) (command "_.MSPACE") (while (setq p (getpoint " Select an Easting Gridline:")) (command "_.PSPACE") (setq TxtPos (getpoint " Pick Label Location: ")) (setq x (rtos (car p))) (setq x (strcat "E " x)) (command "_TEXT" TxtPos "90" x "") ; I would prefer to use MText with a backbround mask and an offset ) (princ) ) (princ "Use GLN for Northings, and GLE for Eastings") ;Could both Northings and Eastings be done from one command? (princ) Cheers! and thanks again for your time. Andy.
  7. I have a dwg that I'm using paperspace for text with a viewport of an xref'd 3D model, I have some mtext with background masking, using drawing background color, border offset factor of 1.2, it only masks when I hover over the text. I used Draworder and brought the mtext to the front, nothing I do works, what can the problem be? Fill is on, shademode is 2Dwireframe. I am using Acad 2011. Thanks for any help! R. L. Hamm
  8. Hi all, whenever I enter the MTEXT editing function, then type a letter on any given line of text, that line rotates to the world UCS. This makes typing almost impossible, as the overlapping text can't be read clearly. Any suggestions? I'm using AutoCAD 2013 for Mac and looking at my drawing with a rotated UCS.
  9. I am trying to write a routine that allows users to input items and weights in a dialog box, and outputs a formatted MText (among other things). I allow the user to input up to 10 items, but I only want the MText to use the values that are filled in. Here's what my dialog box looks like: And here's what my output looks like: Here's my code for the Mtext: (setq val (strcat "\\pxtr18,c20,r30;\t" eq1 "\t=\t" wt1 " LB \\P\t" eq2 "\t=\t" wt2 " LB \\P\t" eq3 "\t=\t" wt3 " LB \\P\t" eq4 "\t=\t" wt4 " LB \\P\t" eq5 "\t=\t" wt5 " LB \\P\t" eq6 "\t=\t" wt6 " LB \\P\t" eq7 "\t=\t" wt7 " LB \\P\t" eq8 "\t=\t" wt8 " LB \\P\t" eq9 "\t=\t" wt9 " LB \\P\t" eq10 "\t=\t" wt10 " LB" )) (entmake (list (cons 0 "MTEXT") (cons 100 "AcDbEntity") (cons 100 "AcDbMText") (cons 10 pt1) (cons 1 val) (cons 8 "NOTES") (cons 40 0.09375) (cons 7 "ROMANS") (cons 41 4))) Any suggestions how to make it ignore the "0" values? Thanks in advance!
  10. HI CadTutorers First post, hopefully many more to come. I have a control line 14 km long and dont see the need to manual edit each mtext. The (departmental) Chainage macro im using spits out mtext like 1000.00 1100.000, however my proj manager wants it in km on the plan. It is to be labbled as follows 1.1km 1.2km and so on any quick way to get this done. Thanks in Advance Greenuser.
  11. 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.
  12. 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
  13. Hello, I'm new to the world of LISP and have found lots of code that almost does what I am looking for. I have several drawings that contain text in the same location. ie each drawing has a title placed using the same instertion point. Additionally the text objects are layed out to look like a table. One column will have the heading and the other column will have the result. I would like to have a program the allows me to enter in the instertion points for each text element I want in the order I would like it to appear in the text document or ideally in a csv format. Thanks for your help!
  14. Is there a way to change multiple MTexts at once to a certain font? I don't have the full version, only AutoCAD LT 2013 so unfortunately I don't have the fancy express tools or lisps. I have at least 1000 MTexts that need to be changed. This will take a long time if I have to activate each one and change them individually. Please help! Thanks
  15. I'm trying to plot a large poster (108" long) onto a 36" wide roll of paper. The image, texts, and leader plotted fine; the polylines and mtext did not. Everything shows up in the preview, but the two mentioned items don't actually get plotted onto the paper.
  16. I am trying to write a routine to "simulate" MText command in lisp using predefined Text Height (2.0mm in this case for 1:1 scale) and text Style. I started with this code: (defun C:test (/ Height Style) (setvar "cmdecho" 1) (setq Height (* (getvar "DIMSCALE") 2.0 )) (setq Style "My_Style") (command "._MTEXT" pause "H" Height "S" Style pause) (princ) ) The text style seems to work but the Text Height doesn't change. Could anyone help please?
  17. My question: How do I change the font styles of multiple mtext's. My solution: Select all the boxes, type mo for properties, then change the style in the properties window. To make this simpler in the future I put all the text boxes in their own layer so I can use qselect to select them all quickly.
  18. Hi folks, my first post here.. so please bear with me. Firstly, I'm using ZWCAD which should be identical to AutoCAD but who knows... One of the layers is in red, but when I plot the file, all the lines are red (which is OK) and the text is black... what am I supposed to do to keep the text in red? The same happens when I export the CAD file to PDF Thanks for your answers!!
  19. Hello everyone, this is my first post on here and am hoping that someone can help. I have been using Autocad 2012 for a while and last week it became intolerably slow resulting in me uninstalling it and reinstalling it again. This solved the problem and it returned to normal, however, now when i enter multiline text it is always slanted to the right as if it is written in italics. I cannot figure out how to solve this without setting the oblique angle to -11.6 to get it straight again. all other systems running cad 2012 are fine, and when i open an existing drawing with text in, it automatically displays it slanting but then appears normally again when it's opened on the other computers. If anyone could help i'd be really grateful. Thanks Jack
  20. Hi, Does someone know if it's possible to do a "global change" (values) to Attributes in MText? I'm using 2010. Those MText attributes are practical but a pain in the neck for my existing tools! Merci beaucoup!
  21. QLeader not placing text centered to firstline Hi all I don’t know is this a problem with a lispmy company has set up or whether it is an autoCAD error. When I go to create a leader I type LE withis short on my system for QLEADER. You can then draw your leader or entersettings One I have drawn the leader I go to placethe text the problem I then have is that sometime my text appears below theline (pic 1) and sometime appears next to the line (pic 2) Pic 1 Pic 2 In the setting I make sure they are asbelow be sometime is doesn’t matter. (I think this has something to do withdrawing setup or annotation scale.) I have attached a file where I am havingthe problem as well as one that I am not having the problem QLEADER CORRECT.dwg QLEADER ERROR.dwg
  22. I have a lot of Text and MText in differences pattern and I'm looking for the command that can help me to work easier, Ex. XX01-000-XX000, XX00-000-XXX00 need to change to XX01_000-XX000, It's just "_" and "-" only but it's have too many for used "ED" and "shift + _". Please someone help me. Thank you so much.
  23. Hi there. I've never really used annotative text in past versions of AutoCAD because I've always found it to be flawed, and also never really needed 2 different scales, but now I've moved on to 2011, it is much simpler to use, except for this 1 issue... Is it possible to move each scaled text to different parts of the drawing? As an example, I have a room which text at 1:50 fits in fine, But 1:100 gets in the way of some of the equipment in there, so I would like to keep the 1:50 text in the room, and move the 1:100 to just outside. I can't work out if this is possible or not, or if I would just have to use non annotative text at 2 different scales. Any help would be much appreciated. Thank you
  24. I have a block that has MText in it. I need it to refrence the sheet set manager "CurrentSheetTitle" sometimes the title can be long, so i am using mtext so it will wrap correctly. when i insert the block other attribut fields display properly, but the mtext for this field does not. after i explode the block, then the MText field displays properly. i have another MText field that reads plot time and user name. that is contained in the same block and updated perfectly. any ideas on this or any way to make it better.
  25. Hi there. I'm a long time reader, but only just signed up because I couldn't find my particular problem anywere else. Just to warn you, it may get a little complicated... When I type the word TYPE:, then use the tab button, then Enter, AutoCAD automatically writes TYPF:, then every time I tab along, it continually puts the letter A: after. This more annoying than a real problem, as the job I'm working on currently requires me to go through this hassle with over 100 drawings! If anyone knows what this little glitch is, or how to stop it, I will be very grateful Thanks
×
×
  • Create New...