Community
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<jaswild69> wrote in messageI
href="news:6138609@discussion.autodesk.com">news:6138609@discussion.autodesk.com...
have been working with various routines to find a way to change the attribute
text height of only select blocks. I always seem to end up changing every
attribute in the drawing. For example, if I place the same block side-by-side
in the drawing and want to change the attributes text size of one without it
affecting the other. Regards, Jason
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
"The Dark Princess" <
href="mailto:here@there.ca">here@there.ca> a écrit dans le message de
news:
href="mailto:6138715@discussion.autodesk.com">6138715@discussion.autodesk.com...
(defun chng_att_hgt ( en attrib hgt / obj
atts)
(if (and en (setq obj
(vlax-ename->vla-object en)) (= (vlax-get-property obj 'HasAttributes)
:vlax-true))
(foreach attobj
(vlax-safearray->list (variant-value (vla-getattributes obj)))
size=2> (if
(= (vlax-get-property attobj 'TagString) attrib)
size=2>
(progn
size=2> (setq
ed (entget (vlax-vla-object->ename attobj))
size=2> ed
(subst (cons 40 hgt)(assoc 40 ed) ed)
size=2> )
size=2>
(entmod ed)
size=2>
)
size=2> )
)
)
)
TDP
size=2>
size=2>
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<jaswild69> wrote in messageI
href="news:6138609@discussion.autodesk.com">news:6138609@discussion.autodesk.com...
have been working with various routines to find a way to change the
attribute text height of only select blocks. I always seem to end up
changing every attribute in the drawing. For example, if I place the same
block side-by-side in the drawing and want to change the attributes text
size of one without it affecting the other. Regards,
Jason
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
"Some Buddy" <
href="mailto:cyberiq@mailcity.com">cyberiq@mailcity.com> wrote in
message
href="news:6138746@discussion.autodesk.com">news:6138746@discussion.autodesk.com...
Hi Princess,
Just curious, why not
(vlax-for attobj (vla-getattributes
obj)))
instead of
(foreach attobj (vlax-safearray->list
(variant-value (vla-getattributes obj)))
HTH
--
Humans are born with a wide horizon.
As time goes by, the horizon
narrows and
narrows, until it becomes a point of view.
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
"The Dark Princess" <
href="mailto:here@there.ca">here@there.ca> a écrit dans le message de
news:
href="mailto:6138715@discussion.autodesk.com">6138715@discussion.autodesk.com...
(defun chng_att_hgt ( en attrib hgt / obj
atts)
(if (and en (setq obj
(vlax-ename->vla-object en)) (= (vlax-get-property obj 'HasAttributes)
:vlax-true))
(foreach attobj
(vlax-safearray->list (variant-value (vla-getattributes
obj)))
size=2> (if
(= (vlax-get-property attobj 'TagString) attrib)
size=2>
(progn
size=2> (setq
ed (entget (vlax-vla-object->ename attobj))
size=2> ed
(subst (cons 40 hgt)(assoc 40 ed) ed)
size=2> )
size=2>
(entmod ed)
size=2>
)
size=2> )
)
)
)
TDP
size=2>
size=2>
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<jaswild69> wrote in messageI
href="news:6138609@discussion.autodesk.com">news:6138609@discussion.autodesk.com...
have been working with various routines to find a way to change the
attribute text height of only select blocks. I always seem to end up
changing every attribute in the drawing. For example, if I place the same
block side-by-side in the drawing and want to change the attributes text
size of one without it affecting the other. Regards,
Jason
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
"The Dark Princess" <
href="mailto:here@there.ca">here@there.ca> a écrit dans le message de
news:
href="mailto:6138724@discussion.autodesk.com">6138724@discussion.autodesk.com...
LOL!
you're so right!
TDP
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
"Some Buddy" <
href="mailto:cyberiq@mailcity.com">cyberiq@mailcity.com> wrote in
message
href="news:6138746@discussion.autodesk.com">news:6138746@discussion.autodesk.com...
Hi Princess,
Just curious, why not
(vlax-for attobj (vla-getattributes
obj)))
instead of
(foreach attobj
(vlax-safearray->list (variant-value (vla-getattributes
obj)))
HTH
--
Humans are born with a wide horizon.
As time goes by, the horizon
narrows and
narrows, until it becomes a point of view.
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
"The Dark Princess" <
href="mailto:here@there.ca">here@there.ca> a écrit dans le message
de news:
href="mailto:6138715@discussion.autodesk.com">6138715@discussion.autodesk.com...
(defun chng_att_hgt ( en attrib hgt / obj
atts)
(if (and en (setq obj
(vlax-ename->vla-object en)) (= (vlax-get-property obj 'HasAttributes)
:vlax-true))
(foreach attobj
(vlax-safearray->list (variant-value (vla-getattributes
obj)))
size=2> (if
(= (vlax-get-property attobj 'TagString) attrib)
size=2>
(progn
size=2> (setq
ed (entget (vlax-vla-object->ename attobj))
size=2> ed
(subst (cons 40 hgt)(assoc 40 ed) ed)
size=2> )
size=2>
(entmod ed)
size=2>
)
size=2> )
)
)
)
TDP
size=2>
size=2>
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<jaswild69> wrote in messageI
href="news:6138609@discussion.autodesk.com">news:6138609@discussion.autodesk.com...
have been working with various routines to find a way to change the
attribute text height of only select blocks. I always seem to end up
changing every attribute in the drawing. For example, if I place the
same block side-by-side in the drawing and want to change the attributes
text size of one without it affecting the other. Regards,
Jason
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<ian_bryant> wrote in messageHi,
href="news:6139031@discussion.autodesk.com">news:6139031@discussion.autodesk.com...
because it does not work. Regards Ian
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<ian_bryant> wrote in message
href="news:6139031@discussion.autodesk.com">ne
ws:6139031@discussion.autodesk.com...Hi, because it does not work.
Regards Ian
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<Ian_Bryant> wrote in messageHi,
href="news:6139869@discussion.autodesk.com">news:6139869@discussion.autodesk.com...
Sorry I should have been a bit more clear. Your code works fine. I was
commenting that vlax-for does not work on (vla-getattributes obj) as the
getattributes method returns a variant containing a safearray & not a
collection. Regards Ian