- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Denunciar
Create a Block with Attributes, where text covers block if exists given area.
I want to create a block with text attributes inside, where if the attribute text is too long the text box will cover the block lines beneath.
Is this possible? If so how is it done?
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Denunciar
Are you by chance using multi-line attributes, or single?
Can you post your block too so we can see what you are working with, and post a screenshot of the effect you wish to create (or avoid)?
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Denunciar
This would be the block I would like to work with. Depending on if the tag number on the bottom is shorter or longer, it would be nice to not have to explode it each time to trim the box around the text
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Denunciar
Make the attribute multi-line and add a background mask.
IMHO, the linework should be sized to accommodate the longest the attribute value could be. I don't like seeing the symbol broken.
Rob
Drafting is a breeze and Revit doesn't always work the way you think it should.
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Denunciar
You could create a dynamic block with a wipeout object that is in front of the geometry but in back of the attribute text. Use wipeoutframe to turn off the lines of the wipeout frame. The wipeout frame would normally be within the bounds of the block geometry but if you had a long text string you could stretch the wipeout frame to see the text clearly and hide the geometry it overlaps.
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Denunciar
@dylanwagner1996 hi,
here is a lisp command to condense an attribute by setting it to fit justify.
wrap this in a lisp file than load it and run CSA command.
Command: CSA
Pick an Attribute: <do that>
Max characters <3>: <Specify max characters width>
it runs in a loop and remembers your last Max value.
enjoy
moshe
; condense attribute
(defun c:csa (/ getMaxChar pick ename elist n dbTextBox attang atthgt lowerLeft
upperRight diagonal midJustify cenJustify dbSample charWidth p10 p11)
(defun getMaxChar (msg def / ask)
(if (setq ask (getint (strcat "\n" msg " <" (itoa def) ">: ")))
(setq def ask)
(setq ask def)
)
); getMaxChar
; here start command
(if (= (getvar "useri1") 0)
(setvar "useri1" 3)
)
(while (and
(setq pick (nentsel "\nPick an Attribute: "))
(setq ename (car pick))
(setq elist (entget ename))
(eq (cdr (assoc '0 elist)) "ATTRIB")
(setvar "useri1" (setq n (getMaxChar "Max characters" (getvar "useri1"))))
)
(setq dbTextBox (textbox elist))
(setq attang (cdr (assoc '50 elist)))
(setq atthgt (cdr (assoc '40 elist)))
(setq lowerLeft (cdr (assoc '10 elist)))
(setq upperRight (list (+ (car lowerLeft) (caadr dbTextBox)) (+ (cadr lowerLeft) (cadadr dbTextBox))))
(setq diagonal (distance lowerLeft upperRight) ang (angle lowerLeft upperRight))
(setq midJustify (polar lowerLeft (+ attang ang) (/ diagonal 2)))
(setq cenJustify (polar midJustify (- attang (/ pi 2)) (/ atthgt 2)))
(setq dbSample (textbox (list (assoc '0 elist) (assoc '7 elist) (assoc '40 elist) '(1 . "8"))))
(setq charWidth (car (cadr dbSample)))
(setq p10 (polar cenJustify (+ attang pi) (* charWidth n 0.5)))
(setq p11 (polar cenJustify attang (* charWidth n 0.5)))
; replace start point
(setq elist (subst (cons '10 p10) (assoc '10 elist) elist))
; set fitted alignment
(if (assoc '72 elist)
(setq elist (subst '(72 . 5) (assoc '72 elist) elist))
(setq elist (append elist (list '(72 . 5))))
)
; replace alignment point
(if (assoc '11 elist)
(setq elist (subst (cons '11 p11) (assoc '11 elist) elist))
(setq elist (append elist (list (cons '11 p11))))
)
(entmod elist) ; update datbase
); while
(princ)
); c:csa
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Denunciar
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Denunciar
made a tiny change, turn max characters to real value cause it does not really represent a full character but a width factor, this way you better control the text width to be fit
please mark this as your solution.
moshe
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Denunciar
I'll let Lynn Allen explain how to do make a multiline attribute:
https://www.youtube.com/watch?time_continue=275&v=MakurPMU9no
Let me know if you need help applying a background mask.
Why didn't you try to find out for yourself?
IMVHO, wipeouts are not a good solution. They can cause issues at printing time.
Rob
Drafting is a breeze and Revit doesn't always work the way you think it should.