Hi Guys,
when a text is selected, in properties palette the Annotative field can be turned on/off - how can i do it programatically?
activex doesn't not have a propertiy for it. i presume it is in xrecords but could not find it.
thanks in advanced
Moshe
Solved! Go to Solution.
Solved by hmsilva. Go to Solution.
@Moshe-A wrote:Hi Guys,
when a text is selected, in properties palette the Annotative field can be turned on/off - how can i do it programatically?
activex doesn't not have a propertiy for it. i presume it is in xrecords but could not find it.
thanks in advanced
Moshe
The most simple way i can think of is:
(command "_chprop" (ssget "_X" '((0 . "MTEXT,TEXT")(410 . "MODEL"))) "" "A" "No" "")
(command "_chprop" (ssget "_X" '((0 . "MTEXT,TEXT")(410 . "MODEL"))) "" "A" "Yes" "")
(command "_chprop" entity "" "A" "Yes" "")
Sorry by mistake i pressed 'Accept as Solution'
On my current application have some attribute blocks that are placed in at 1X1 scale but the text style is annotative. i would like to give the user an option to turn off the annotation when they are 100% sure these blocks are in the right scale (and it won't be changed in future)
Thank you very much for your help
Moshe
@Moshe-A wrote:Sorry by mistake i pressed 'Accept as Solution'
On my current application have some attribute blocks that are placed in at 1X1 scale but the text style is annotative. i would like to give the user an option to turn off the annotation when they are 100% sure these blocks are in the right scale (and it won't be changed in future)
Thank you very much for your help
Moshe
No worries. i already took care of that.
I'll have a look see-later and see what i can dig up.
Moshe,
to remove anotatividade to a text
(defun c:test (/ ed) (setq ed (entget (car (entsel)) '("AcadAnnotative"))) (setq ed (subst (list -3 (list "AcadAnnotative" '(1000 . "AnnotativeData") '(1002 . "{") '(1070 . 1) '(1070 . 0) '(1002 . "}") ) ) (assoc -3 ed) ed ) ) (entmod ed) (princ) )
hope that helps
Henrique
Henrique,
it looks like the ATTRIB does not holds this xdata so it must be in ATTDEF?
i thought i could turn each attrib annotation to off?
Moshe,
just for testing
(defun c:test (/ ed blk att) (setq blk (car (entsel "\nSelect a block to remove Annotative prop from text: "))) (setq att blk) (if (assoc 66 (entget blk)) (while (= (cdr (assoc 0 (entget (setq att (entnext att))))) "ATTRIB") (setq ed (entget att '("AcadAnnotative"))) (setq ed (subst (list -3 (list "AcadAnnotative" '(1000 . "AnnotativeData" ) '(1002 . "{") '(1070 . 1) '(1070 . 0) '(1002 . "}")) ) (assoc -3 ed) ed ) ) (entmod ed) ) ) (princ) )
hope that helps
Henrique
Henrique & pbejse
here is an update on this case
althought the disable for the annotative attribute is done the behaviour of autocad is weird
some time changing the annotation scale does have no effect on them some time it does
it look like autocad remembers the previous annotation scale that were apply to those objects
and do change the scale even if annotative is off and it may do this with an unmatched scale to the
current annotation selected scale
Moshe
Ok - here it is
i have disable annotative in all 3 attributes
did more checks and it look like autocad do remember the prevoius scales that were applied before turnning annotative off and restore these scale as you change annotation scale
thought i would delete those scale from block (or attributes) but could not find them there
maybe this happends due this is too complex object? (e.g dynamic annotative block with attributes?)
thanks
moshe
Moshe,
also can't find where is stored the annotative property after being disabled...
I'll keep looking...
Henrique
Can't find what you're looking for? Ask the community or share your knowledge.