Jump to content

Recommended Posts

Posted

quick question:

What is the DXF code to switch of "Match Ttext Orientation to Layout"

This codes rotates a "TEXT" entity.

 
(defun c:test ()
 (cond ((setq lin-a (car (entsel "\n Select Line")))
 (setq lin-a (entget lin-a)
       pt1   (trans (cdr (assoc 10 lin-a)) 1 0)
       pt2   (trans (cdr (assoc 11 lin-a)) 1 0)
 )
 (setq txt-lst (car (entsel)))
 (entmod (subst (cons 50 (angle pt1 pt2))
  (assoc 50 (entget txt-lst))
  (entget txt-lst)
  )
 )
)
 )
)

Problem with this is if the Match text orientation toggle is Yes.. it will not rotate

Wheres the switch in DXF, I tried setting 72 to 0 but it still wont rotate?

:)

Posted

 

Problem with this is if the Match text orientation toggle is Yes.. it will not rotate

 

 

What do you mean by that ?

Posted

This one :)

 

match orientation.jpg

 

I understand that you can uncheck this on Text Style Dialog.

but what if its already existing... i got stumped findingthe DXF for that

Posted

I could not get it within my Version 2010 .

 

** edit ** I just found it let chech it out and I may could help you with it.

Posted

The annotative stuff is stored in XData, I believe the item you refer to is under the Appname: AcadAnnoPO

 

  (-3
     (
        "AcadAnnotative"
        (1000 . "AnnotativeData")
        (1002 . "{")
        (1070 . 1)
        (1070 . 1)
        (1002 . "}")
     )
[color=blue][b]      (
        "AcadAnnoPO"
        (1070 . 1)
     )[/b][/color]
  )

Posted
The annotative stuff is stored in XData, I believe the item you refer to is under the Appname: AcadAnnoPO

 

(-3
(
"AcadAnnotative"
(1000 . "AnnotativeData")
(1002 . "{")
(1070 . 1)
(1070 . 1)
(1002 . "}")
)
[color=blue][b] (
"AcadAnnoPO"
(1070 . 1)
)[/b][/color]
)

 

okee.. so does that mean, if i can retrive it, i can modify and update it? :unsure:

Posted
Check post No. 10 , and try that routine which is included within .

Hope this help .

 

Tharwat

 

Thanks Tharwat i'll look into it

:)

Posted (edited)
okee.. so does that mean, if i can retrive it, i can modify and update it? :unsure:

 

I don't work with annotative stuff, but would believe so, yes.

 

Something like this perhaps:

 

(defun RemoveMatchOrientation ( entity )
 (if (assoc -3 (entget entity '("AcadAnnoPO")))
   (entmod (list (cons -1 entity) (list -3 '("AcadAnnoPO"))))
 )
)

 

Or maybe something to encompass both:

 

;; entity: Entity Name
;; flag  : T=MatchOrientation, else nil

(defun MatchOrientation ( entity flag )
 ;; © Lee Mac 2010
 (if (assoc -3 (entget entity '("AcadAnnotative")))
   (entmod (list (cons -1 entity) (list -3 (cons "AcadAnnoPO" (if flag (list '(1070 . 1)))))))
 )
)

Edited by Lee Mac

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...