|
|
#1 |
|
Full Member
![]() ![]() Using: AutoCAD 2009 Join Date: Jul 2009
Posts: 74
|
I've been doing a bit of match properties for text elements in drawings recently, and have found that the matchprop button is a real drag when attempting to synchronize text styles throughout a drawing. When matchprop is used to match multiple texts, they will all fling off in the direction the selected text is set at. I want to make it so that I can use match properties without matching the rotation. I’ve tried toggling the settings to no avail - I want everything else to be the same except geometry. Hope someone can help!! |
|
|
|
|
|
#2 | |
|
Super Member
![]() ![]() ![]() ![]() Using: Civil 3D 2009 Join Date: Apr 2008
Posts: 1,488
|
Quote:
|
|
|
Seann: ...it went crazy ex-girlfriend on me...
eric_monceaux...its pretty funny seeing two AutoCAD Gods give each other flak... |
||
|
|
|
|
|
#3 |
|
Full Member
![]() ![]() Using: AutoCAD 2009 Join Date: Jul 2009
Posts: 74
|
NEVER USE MATCH PROPERTIES?! I am shocked. I dread to think where I would be without it. Explaining everything I want it to do would most likely be very long winded when I can just say I need it to function exactly as the normal matchprop - aside from mimicking rotation. And you are right in saying that the settings can be adjusted, but when I do that it will not only ignore rotation but also ignore the text style/ size etc. which is definitely no good for me! I intend to use it in conjunction with Lee Mac's "MacAlign" command, which creates a piece of text in perfect alignment with a selected object. After doing this it would be great to be able to quickly match the style of the newly created text to that of existing text. |
|
|
|
|
|
#4 | |
|
Super Member
![]() ![]() ![]() ![]() Using: Civil 3D 2009 Join Date: Apr 2008
Posts: 1,488
|
Quote:
Generally I only want to match the layer, so all the add ons that come with Match Properties are unnecessary. I wrote my own LayerPut. Code:
Command: LP Select object(s) to be changed: Select objects: Specify opposite corner: 1 found Select objects: Select object on destination layer or [Current/Dialog/Type]: 1 object(s) moved to layer "CNTR", the current layer. |
|
|
Seann: ...it went crazy ex-girlfriend on me...
eric_monceaux...its pretty funny seeing two AutoCAD Gods give each other flak... |
||
|
|
|
|
|
#5 |
|
Full Member
![]() ![]() Using: AutoCAD 2009 Join Date: Jul 2009
Posts: 74
|
I can definitely see it's use, though sadly for me the matching of styles/ sizes etc are of sterling importance
![]() |
|
|
|
|
|
#6 |
|
Super Member
![]() ![]() ![]() ![]() Using: Civil 3D 2009 Join Date: Apr 2008
Posts: 1,488
|
Try this, completely untested:
Code:
;;; Match Text/Mtext Style and Height of source Text/Mtext object
;;; Alan J. Thompson, 11.03.09
(defun c:MS (/ *error* #Obj #SS #Style #Size)
;;; error handler
(defun *error* (#Message)
(and *AcadDoc* (vla-endundomark *AcadDoc*))
(and #Message
(not (wcmatch (strcase #Message) "*BREAK*,*CANCEL*,*QUIT*"))
(princ (strcat "\nError: " #Message))
) ;_ and
) ;_ defun
(or *AcadDoc* (setq *AcadDoc* (vla-get-activedocument (vlax-get-acad-object))))
(vla-startundomark *AcadDoc*)
(cond
((and (setq #Obj (car (entsel "\nSelect source text object: ")))
(vl-position (cdr (assoc 0 (entget #Obj))) '("MTEXT" "TEXT"))
(setq #Obj (vlax-ename->vla-object #Obj))
;; (setq #Obj (AT:Entsel nil "\nSelect source text object: " '("V" (0 . "MTEXT,TEXT")) nil))
(setq #SS (ssget "_:L" '((0 . "MTEXT,TEXT"))))
) ;_ and
(setq #Style (vla-get-stylename #Obj)
#Size (vla-get-height #Obj)
) ;_ setq
(vlax-for x (setq #SS (vla-get-activeselectionset *AcadDoc*))
(vl-catch-all-apply 'vla-put-stylename (list x #Style))
(vl-catch-all-apply 'vla-put-height (list x #Size))
) ;_ vlax-for
(vl-catch-all-apply 'vla-delete (list #SS))
)
) ;_ cond
(*error* nil)
(princ)
) ;_ defun
Last edited by alanjt : 4th Nov 2009 at 05:51 pm. Reason: I'm retarded. |
|
Seann: ...it went crazy ex-girlfriend on me...
eric_monceaux...its pretty funny seeing two AutoCAD Gods give each other flak... |
|
|
|
|
|
|
#7 |
|
Full Member
![]() ![]() Using: AutoCAD 2009 Join Date: Jul 2009
Posts: 74
|
Looks promising! Though something is causing the routine to error;
Command: MS Select source text object: Select objects: 1 found Select objects: ; error: ActiveX Server returned the error: unknown name: TextStyle Command: Command: MS Select source text object: Select objects: 1 found Select objects: ; error: ActiveX Server returned the error: unknown name: TextStyle Command: Text style? I am using RomanS, though any other style i try delivers the same result... |
|
|
|
|
|
#8 |
|
Senior Member
![]() ![]() ![]() |
I’m all for writing custom programs when necessary but in this case, wouldn’t it be just as easy to use the AutoCAD’s properties dialog with quick select?
|
|
|
|
|
|
#9 | |
|
Super Member
![]() ![]() ![]() ![]() Using: Civil 3D 2009 Join Date: Apr 2008
Posts: 1,488
|
Quote:
|
|
|
Seann: ...it went crazy ex-girlfriend on me...
eric_monceaux...its pretty funny seeing two AutoCAD Gods give each other flak... |
||
|
|
|
|
|
#10 | |
|
Full Member
![]() ![]() Using: AutoCAD 2009 Join Date: Jul 2009
Posts: 74
|
Quote:
A valid argument, though marginally slower than the method i am hoping for. Especially if i am to be using it multiple times for single pieces of text here and there throughout the day! I know through the eyes of some it might look a little petty, but i do like making things happen with a single click ![]() |
|
|
|
|
![]() |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Match Attribute Rotation | VisDak | AutoLISP, VBA, the CUI & Customisation | 2 | 5th Jul 2009 11:06 am |
| match properties | FIFTHTEXAS | AutoCAD General | 2 | 17th Mar 2009 01:17 am |
| match properties | yawdapaah | AutoCAD Beginners' Area | 7 | 5th Mar 2009 05:36 pm |
| Match properties for blocks | stevedallas | AutoLISP, VBA, the CUI & Customisation | 7 | 28th Apr 2008 06:28 pm |
| match properties | eddie57 | AutoCAD Beginners' Area | 1 | 3rd Dec 2005 06:59 pm |