Author Topic: how can i change the Annotativity of text programmatically?  (Read 2224 times)

0 Members and 1 Guest are viewing this topic.

andrew_nao

  • Guest
how can i change the Annotativity of text programmatically?
« 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"

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: how can i change the Annotativity of text programmatically?
« Reply #1 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)
)


« Last Edit: April 24, 2015, 11:31:21 AM by Kerry »
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

andrew_nao

  • Guest
Re: how can i change the Annotativity of text programmatically?
« Reply #2 on: April 24, 2015, 11:33:58 AM »
thanks for the reply, Kerry.
Im looking for something that will change it automatically for me

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: how can i change the Annotativity of text programmatically?
« Reply #3 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.







No Code Required.




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

kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

ChrisCarlson

  • Guest
Re: how can i change the Annotativity of text programmatically?
« Reply #4 on: April 24, 2015, 12:56:36 PM »
Is your default text style set to Annotative =yes?

andrew_nao

  • Guest
Re: how can i change the Annotativity of text programmatically?
« Reply #5 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.





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

andrew_nao

  • Guest
Re: how can i change the Annotativity of text programmatically?
« Reply #6 on: April 27, 2015, 11:23:25 AM »
Is your default text style set to Annotative =yes?

default is set to no

ROBBO

  • Bull Frog
  • Posts: 217
The only thing to do with good advice is to pass it on.
It is never of any use to oneself.

Oscar Wilde
(1854-1900, Irish playwright, poet and writer)