Search the Community
Showing results for tags 'formatting'.
-
MText Formatting Problem - Adding a New Line
GregGleason posted a topic in AutoLISP, Visual LISP & DCL
I want to add text to an existing MTEXT, but the utility I have used doesn't support what I am trying to do. I can select it fine, but it doesn't come out right. This is the old format: This is the new format (this is what is desired): This is the old text in properties: This is the new text in properties (this is what is desired): I tried to use this code to call a MRWA.lsp (but the format doesn't work right): (setq mylisp "MRWA.lsp") ; Set the lisp routine name (setq mypatlsp (strcat mypath mylisp)) ; Set the path/file of the lisp routine name (load mypatlsp) ; Load the lisp routine (replace "INSPECTION AND WELDING." "INSPECTION AND WELDING. NORTH IS BASED ON PLANT NOTRTH PER DWG 123-KD-401.") ; Replace MTEXT string: old/new Using this lisp (MRWA.lsp): (defun replace (old new / string_subst dxf idx o ss) (defun string_subst (str old new / idx) (setq idx 0) (while (setq idx (vl-string-search old str idx)) (setq str (vl-string-subst new old str idx)) (setq idx (+ idx (strlen new))) ) str ) (if (setq ss (ssget "_X" (list '(0 . "MTEXT") (cons 410 (getvar 'ctab))))) (repeat (setq idx (sslength ss)) (setq o (vlax-ename->vla-object (ssname ss (setq idx (1- idx))))) (if (vl-string-search old (vla-get-textstring o)) (vla-put-textstring o (string_subst (vla-get-textstring o) old new)) ) ) ) (princ) ) Am I just a few characters off to get this to work right? Or do I need to take another path to make this work? Greg -
Task: Create a schedule from an excel spreadsheet. Tablestyle has been created & looks great when used with "start with empty table". The problem occurs when "create from data link" is used. The information shows up just fine & it lists as the correct tablestyle that has been created but the formatting is lost. From font, to style, to color of text & borders. All gone. Creating schedules from scratch is a typical process but with having excel schedules in place its a little different. I probably could have done them the old way by now since a solution to my problem is nowhere to be found. Note: Attachment shows the desired table style (above) and how it shows up (below) Currently running 2017 MEP in windows. Vanilla Cad is not helping either.
- 3 replies
-
- formatting
- excel
-
(and 1 more)
Tagged with:
-
mirror text set to 0 but still mirroring text justification
kizaerf posted a topic in AutoCAD Drawing Management & Output
I have mirrtext set to '0' so it doesn't mirror the text (which i want, so that's great) however, it does mirror the text justification which drives me nuts. is there a way to fix it so it doesn't change the text formatting at all? please see images. one is non mirrored and you can see the blue grips indicating the change in justification from the left to the right. oops, the first one is after it was mirrored and the second one is pre mirror -
I have started to attempt to learn DCL and am currently using VLIDE as code editor. But when I write a DCL code and click "Format edit window" it returns an error: If I execute the code it runs just fine ("Preview DCL in editor" works, too), but I can't get it to organize my text. Doesn't it work at all or am I the only one having difficulties? I have been searching this since yesterday and have found not a single person mentioning it, which means either one of two things: no one has ever had this problem before or it is so simple to solve that no one ever needed to ask in internet forums. Hope I'm not asking a stupid question here This is an example of code I am trying to format (copied from a DCL tutorial by Jeff Sanders): EXAMPLE : dialog { label = "EXAMPLE.lsp"; : column { : boxed_column { label = "column 1"; : boxed_column { label = "column2"; } : boxed_column { label = "column 3"; } } ok_cancel; } } Thank you all in advance! Felipe
- 1 reply
-
- symbol
- formatting
-
(and 3 more)
Tagged with: