Community
Dynamic Blocks Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

block text

4 REPLIES 4
Reply
Message 1 of 5
moiz
170 Views, 4 Replies

block text

Hi,
I have many blocks with text inside. is there any way to change only the text height when i insert the same in different drawing scale???.
Thanks
moiz
4 REPLIES 4
Message 2 of 5
Anonymous
in reply to: moiz

If you want it done automatically, then you will need some lsp. However, if
you don't mind an extra click when it's inserted, then I would do it with a
lookup and a scale action. (See attached)

Thomas
Message 3 of 5
moiz
in reply to: moiz

Hi,
Thanks for the reply.
lookup & scale action will not be useful since i have many texts inside the block.and i have different blocks with different text height which will be inserted in one drawing. Actually i am looking for some code to change the text height automatically.
thanks
moiz
Message 4 of 5
Anonymous
in reply to: moiz

Here's the code to change the width factor of text and attributes in a block definition.
You'll need to modify it slightly to change height (the dxf field for widthfactor is 41; height is 40).

(defun c:CAW (/ bn nw br an ae)

(if (setq bn (entsel "Select block: "))
(progn
(setq bn (entget (car bn))
bn (if (= (field 0 bn) "INSERT")
bn
(progn (prompt "Not an Block object...\n") (exit))
)
nw (getreal "New Attribute Width: ")
br (tblobjname "block" (field 2 bn))
an br
)
(while (setq an (entnext an))
(setq ae (entget an))
(if (wcmatch (field 0 ae) "ATTDEF,TEXT")
(echg ae 41 nw)
)
)
(command "regenall")
(command "attsync" "name" (field 2 bn))

)
)
)


(defun FIELD (val ent) (cdr (assoc val ent)))

(defun ECHG (ent fld val)
(setq ent (subst (cons fld val) (assoc fld ent) ent))
(entmod ent) )
Message 5 of 5
moiz
in reply to: moiz

Hi,
Thanks a million Mr.Allen,
Moiz

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

”Boost

 

”Tips

 

”Services