PDA

View Full Version : Any way to make an attribute a stackable fraction?



tmad101185
2010-09-28, 04:30 PM
Does anyone know if you can make an attribute so that you can enter a fraction in it's value and have it stack vertically like with regular text? Trying to add attributes for a custom editable weld symbol I am making but can't find a way to have fractions in the weld symbol that I can change once the block is inserted into a project. Thanks!

cadtag
2010-09-28, 04:45 PM
Does anyone know if you can make an attribute so that you can enter a fraction in it's value and have it stack vertically like with regular text? Trying to add attributes for a custom editable weld symbol I am making but can't find a way to have fractions in the weld symbol that I can change once the block is inserted into a project. Thanks!

can you use multiline attibutes, and edit the value in the editor?

tmad101185
2010-09-28, 04:51 PM
I tried using the multiline attributes but it still won't auto stack them. I could possibly make it 2 lines & put an underline over first one but would rather not do it that way if I can help it

irneb
2010-09-30, 08:58 AM
It's impossible using the normal ACad commands. However, you could copy a MText's internal formatting onto the MAttrib through lisp. E.g. the following would ask you to pick an MText and copy its value directly to a picked Attribute (note there's no error checking so if you pick something other than required it's going to fail):
(defun c:Mtext-Attrib (/ en ed an)
(if (and (setq en (nentsel "Pick MText: "))
(setq ed (entget (car en)))
(setq an (nentsel "Pick Attribute: "))
)
(progn
(entmod (list (cons -1 (car an)) (assoc 1 ed)))
(entupd (car an))
)
)
(princ)
)