Jump to content

Match Orientation


pBe

Recommended Posts

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?

:)

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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]
  )

Link to comment
Share on other sites

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:

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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...