TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: andrew_nao on April 24, 2015, 10:39:57 AM

Title: how can i change the Annotativity of text programmatically?
Post by: andrew_nao on April 24, 2015, 10:39:57 AM
for some reason the Annotativity of text on some dwgs keep changing to "yes" (see picture)
anyone have code to share to change that to "no"
Title: Re: how can i change the Annotativity of text programmatically?
Post by: Kerry on April 24, 2015, 11:27:04 AM



See if this helps you to write your own :



Command: DXFLIST
Select entity to display its DXF value data:
(-1 . <Entity name: 7ffffb09050>)
(0 . "MTEXT")
(330 . <Entity name: 7ffffb03f10>)
(5 . "65D")
(100 . "AcDbEntity")
(67 . 0)
(410 . "Model")
(8 . "0")
(100 . "AcDbMText")
(10 2396.49 2611.01 0.0)
(40 . 35.0)
(41 . 420.527)
(46 . 0.0)
(71 . 1)
(72 . 5)
(1 . "This is MText")
(7 . "T35")
(210 0.0 0.0 1.0)
(11 1.0 0.0 0.0)
(42 . 269.675)
(43 . 35.0)
(50 . 0.0)
(73 . 1)
(44 . 1.0)
Command:


Command:
DXFLIST
Select entity to display its DXF value data:
(-1 . <Entity name: 7ffffb09060>)
(0 . "MTEXT")
(5 . "65E")
(102 . "{ACAD_XDICTIONARY")
(360 . <Entity name: 7ffffb090b0>)
(102 . "}")
(330 . <Entity name: 7ffffb03f10>)
(100 . "AcDbEntity")
(67 . 0)
(410 . "Model")
(8 . "0")
(100 . "AcDbMText")
(10 2875.94 2611.01 0.0)
(40 . 35.0)
(41 . 594.63)
(46 . 0.0)
(71 . 1)
(72 . 5)
(1 . "This is Annotative MText")
(7 . "T35")
(210 0.0 0.0 1.0)
(11 1.0 0.0 0.0)
(42 . 514.675)
(43 . 35.0)
(50 . 0.0)
(73 . 1)
(44 . 1.0)
(-3 ("AcadAnnotative" (1000 . "AnnotativeData") (1002 . "{") (1070 . 1) (1070 . 1) (1002 . "}")))




Code: [Select]

(defun c:dxflist (/ eko)
  (setq eko (getvar 'cmdecho))
  (setvar 'cmdecho 0)
  (setq
    *lent* (entget
             (car (entsel "\nSelect entity to display its DXF value data: "))
             '("*")
           )
  )
  (textscr)
  (list *lent*)
  (foreach n *lent* (print n))
  (setvar 'cmdecho eko)
  (princ)
)


Title: Re: how can i change the Annotativity of text programmatically?
Post by: andrew_nao on April 24, 2015, 11:33:58 AM
thanks for the reply, Kerry.
Im looking for something that will change it automatically for me
Title: Re: how can i change the Annotativity of text programmatically?
Post by: Kerry on April 24, 2015, 11:53:47 AM



Do you have Quick Properties configured.
Does it display Annotivity ?
You can simply select the text and toggle the value from Yes to No.


(http://i60.tinypic.com/5d87mg.png)




No Code Required.




Personally, I'd find what is changing it to a value you don't want and repair that.

Title: Re: how can i change the Annotativity of text programmatically?
Post by: ChrisCarlson on April 24, 2015, 12:56:36 PM
Is your default text style set to Annotative =yes?
Title: Re: how can i change the Annotativity of text programmatically?
Post by: andrew_nao on April 27, 2015, 11:22:57 AM

Do you have Quick Properties configured.
Does it display Annotivity ?
You can simply select the text and toggle the value from Yes to No.


(http://i60.tinypic.com/5d87mg.png)


No Code Required.


Personally, I'd find what is changing it to a value you don't want and repair that.
no we dont use those boxes. im in an odd situation with my co-workers... long story.
ive been looking through every file i cant seem to find it. i it happens usually with older dwgs that are opened some of them are newer (within the last year).
700 lisp files is a difficult task to rifle through to fine 1 line or 1 word.

i was looking for an easy out
Title: Re: how can i change the Annotativity of text programmatically?
Post by: andrew_nao on April 27, 2015, 11:23:25 AM
Is your default text style set to Annotative =yes?

default is set to no
Title: Re: how can i change the Annotativity of text programmatically?
Post by: ROBBO on April 29, 2015, 07:45:54 AM
CHANGE command - This link may help:

http://www.cadtutor.net/forum/showthread.php?53621-Annotative-text-conversion&s=671a783f9cb635dfa12a60519f589ddb (http://www.cadtutor.net/forum/showthread.php?53621-Annotative-text-conversion&s=671a783f9cb635dfa12a60519f589ddb)