Author Topic: Multileader: Move but keep original placement of leader points  (Read 5028 times)

0 Members and 1 Guest are viewing this topic.

alanjt

  • Needs a day job
  • Posts: 5352
  • Standby for witty remark...
Re: Multileader: Move but keep original placement of leader points
« Reply #15 on: May 06, 2010, 02:30:18 PM »
Sadly, I can't just make my text non-annotative.
Civil 3D 2019 ~ Windohz 7 64bit
Dropbox

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Multileader: Move but keep original placement of leader points
« Reply #16 on: May 06, 2010, 02:33:29 PM »
I didn't make anything non-annotative, I just changed the point of the annotative section also.  I guess I could write a quick code to show you if you want?
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

alanjt

  • Needs a day job
  • Posts: 5352
  • Standby for witty remark...
Re: Multileader: Move but keep original placement of leader points
« Reply #17 on: May 06, 2010, 02:46:35 PM »
I didn't make anything non-annotative, I just changed the point of the annotative section also.  I guess I could write a quick code to show you if you want?
Wait, so you got it to work on the Annotative MLeader?
If you don't mind showing a little code (when you get the chance), I'd really appreciate it. I guess I'm not fully understanding what you are saying. :ugly:
Civil 3D 2019 ~ Windohz 7 64bit
Dropbox

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Multileader: Move but keep original placement of leader points
« Reply #18 on: May 06, 2010, 02:50:40 PM »
Here you go.  It will change the pointing point to 0,0,0 for anno leaders, and non-anno leaders, at least it did in my test drawing that I posted.  Time for lunch, so I'll answer questions after, if you have any.

Code: [Select]
(defun c:Test (/ Sel MnData data)
   
    (setq Sel (entsel "\n Select mleader to change it's arrow point to 0,0: "))
    (setq MnData (entget (car Sel)))
    (if (setq data (member '(102 . "{ACAD_XDICTIONARY") MnData))
        (progn
            (print "dict")
            (setq data (entget (cdr (assoc 360 data))))
            (if (setq data (member '(3 . "AcDbContextDataManager") data))
                (progn
                    (print "man")
                    (setq data (entget (cdr (assoc 360 data))))
                    (if (setq data (member '(3 . "ACDB_ANNOTATIONSCALES") data))
                        (progn
                            (print "scales")
                            (foreach i (entget (cdr (assoc 350 data)))
                                (if (equal (car i) 350)
                                    (progn
                                        (setq data (entget (cdr i)))
                                        (entmod (subst '(10 0. 0. 0.) (assoc 10 (member '(304 . "LEADER_LINE{") data)) data))
                                    )
                                )
                            )
                        )
                    )
                )
            )
        )
    )
    (entmod (subst '(10 0. 0. 0.) (assoc 10 (member '(304 . "LEADER_LINE{") MnData)) MnData))
    (princ)
)
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Multileader: Move but keep original placement of leader points
« Reply #19 on: May 06, 2010, 05:46:16 PM »
Did you get a chance to test it Alan?  Did it work for you if so?
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

alanjt

  • Needs a day job
  • Posts: 5352
  • Standby for witty remark...
Re: Multileader: Move but keep original placement of leader points
« Reply #20 on: May 06, 2010, 06:21:07 PM »
Did you get a chance to test it Alan?  Did it work for you if so?
Sorry, forgot to respond.  :oops:

Yes, it worked perfectly. I couldn't work on the code any, but I'll be playing with it tonight. Yours will only reset the first leader, but it gives me the information I needed. Unless I can't get to it tonight, I'll post something later. Thanks so much for looking at this Tim. Your code was very educational. :)
Civil 3D 2019 ~ Windohz 7 64bit
Dropbox

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Multileader: Move but keep original placement of leader points
« Reply #21 on: May 06, 2010, 06:27:37 PM »
Good to hear Alan.  I'm sure you will be able to get it to work.

You're welcome.  Glad I could help.
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

alanjt

  • Needs a day job
  • Posts: 5352
  • Standby for witty remark...
Re: Multileader: Move but keep original placement of leader points
« Reply #22 on: May 06, 2010, 06:39:24 PM »
Thanks and thanks. :)
Civil 3D 2019 ~ Windohz 7 64bit
Dropbox