TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: liuhaixin88 on September 20, 2014, 09:10:07 AM

Title: Strengthen the dimensioning
Post by: liuhaixin88 on September 20, 2014, 09:10:07 AM
Dear all.
can use vlisp do this ?
I see a Demonstration.




Title: Re: Strengthen the dimensioning
Post by: lamarn on September 20, 2014, 11:53:22 AM
That would be very welcome! How is this Video made?
Title: Re: Strengthen the dimensioning
Post by: 77077 on September 21, 2014, 09:44:36 AM
Maybe need grread function. but  i can't.
Title: Re: Strengthen the dimensioning
Post by: Stefan on September 21, 2014, 05:16:29 PM
I have something, but it is not finished yet. Sorry...
Title: Re: Strengthen the dimensioning
Post by: Lee Mac on September 21, 2014, 06:19:12 PM
Looking good Stefan!  :-)
Title: Re: Strengthen the dimensioning
Post by: CAB on September 21, 2014, 07:03:34 PM
Ditto  8)
Title: Re: Strengthen the dimensioning
Post by: 77077 on September 21, 2014, 08:16:07 PM
wow. stefan, Great routines,  can sharing ?
Title: Re: Strengthen the dimensioning
Post by: liuhaixin88 on September 22, 2014, 09:58:51 AM
I have something, but it is not finished yet. Sorry...

Mr. Stefan . looking nice ! look forward...
Title: Re: Strengthen the dimensioning
Post by: Kerry on September 22, 2014, 08:48:22 PM
I have something, but it is not finished yet. Sorry...

That looks excellent Stefan.
Title: Re: Strengthen the dimensioning
Post by: tombu on September 23, 2014, 08:06:49 AM
Looks great as it is!  What are you looking to add to finish it?
Title: Re: Strengthen the dimensioning
Post by: alanjt on September 23, 2014, 09:56:02 AM
Based on the dimensionstration, I like it.
Title: Re: Strengthen the dimensioning
Post by: Stefan on September 23, 2014, 07:15:39 PM
Thank you guys for your kind words and sorry for the late response.
Now is working on any UCS and I've added new features, like the option to select object.
Works with any curve not part of a block.
I'll post a new demo but not the lisp file, because I have some doubts...
Title: Re: Strengthen the dimensioning
Post by: liuhaixin88 on September 23, 2014, 08:11:27 PM
Thank you guys for your kind words and sorry for the late response.
Now is working on any UCS and I've added new features, like the option to select object.
Works with any curve not part of a block.
I'll post a new demo but not the lisp file, because I have some doubts...

Nice! Stefan.   what doubts ? can u  provide a Compiled version ?
Title: Re: Strengthen the dimensioning
Post by: qjchen on September 23, 2014, 09:55:39 PM
Thank you guys for your kind words and sorry for the late response.
Now is working on any UCS and I've added new features, like the option to select object.
Works with any curve not part of a block.
I'll post a new demo but not the lisp file, because I have some doubts...

cool, Stefan

I think if it is related to polar tracking, maybe it should be done by .NET or arx.
Title: Re: Strengthen the dimensioning
Post by: andy_lee on September 25, 2014, 06:13:30 AM
Good routine ! Why only see demo?
Title: Re: Strengthen the dimensioning
Post by: Stefan on September 25, 2014, 05:39:04 PM
Didn't had much time lately... This is what I have till now, and I apologize sincerely for the code; it is ugly, undocumented and very little tested.

About the lisp. It takes every perpendicular and tangent direction or every curve that pass thru dimension's definition points, plus horizontal, vertical and aligned orientation (in current UCS). After playing a little bit, I found it very annoying when are too much objects and/or very close orientations.
Try to select a common intersection of at least 3 lines and you'll see what I'm talking about...

But I really like the opportunity to have horizontal, vertical and aligned dimension in one command. I've done a "light" version including just these options and I've already replaced dimlinear command on my autocad. I can tell you, I am extremely delighted about it.

That's all for now, though there are still many things to fix, but it's not gonna happen too soon, at least not me.

Title: Re: Strengthen the dimensioning
Post by: Lee Mac on September 25, 2014, 05:55:06 PM
Nicely done Stefan - relatively concise code for a lot of functionality  :-)
Title: Re: Strengthen the dimensioning
Post by: Stefan on September 25, 2014, 06:03:22 PM
Nicely done Stefan - relatively concise code for a lot of functionality  :-)
Thank you Lee.  I forgot to mention that (entmod (cons -1 ename) ... saw it in one of your lisp. Elegant!!
Title: Re: Strengthen the dimensioning
Post by: Lee Mac on September 25, 2014, 06:24:01 PM
Nicely done Stefan - relatively concise code for a lot of functionality  :-)
Thank you Lee.  I forgot to mention that (entmod (cons -1 ename) ... saw it in one of your lisp. Elegant!!
Thanks Stefan - though, I probably saw it somewhere else too!  :-)
Title: Re: Strengthen the dimensioning
Post by: chlh_jd on September 25, 2014, 07:00:37 PM
Nicely done Stefan - relatively concise code for a lot of functionality  :-)
1+  :-)
Title: Re: Strengthen the dimensioning
Post by: liuhaixin88 on September 25, 2014, 08:37:24 PM
Didn't had much time lately... This is what I have till now, and I apologize sincerely for the code; it is ugly, undocumented and very little tested.

About the lisp. It takes every perpendicular and tangent direction or every curve that pass thru dimension's definition points, plus horizontal, vertical and aligned orientation (in current UCS). After playing a little bit, I found it very annoying when are too much objects and/or very close orientations.
Try to select a common intersection of at least 3 lines and you'll see what I'm talking about...

But I really like the opportunity to have horizontal, vertical and aligned dimension in one command. I've done a "light" version including just these options and I've already replaced dimlinear command on my autocad. I can tell you, I am extremely delighted about it.

That's all for now, though there are still many things to fix, but it's not gonna happen too soon, at least not me.

Thank you very much ! You helped me, also help the most people .great !
Title: Re: Strengthen the dimensioning
Post by: andy_lee on September 25, 2014, 08:43:19 PM
cool ! nice routine ! many thanks stefan
Title: Re: Strengthen the dimensioning
Post by: RolandOrzabal on September 25, 2014, 08:45:45 PM
cool! thanks for sharing stefan :)
Title: Re: Strengthen the dimensioning
Post by: lamarn on September 28, 2014, 04:01:55 PM
Very  nice function. Would be even more nice if it could work in a 3d plane taking into account the Z values of picked points.
Something with this function below i use to dim a 3D point.


Code: [Select]
(defun C:d3d () (dim3d))
(defun dim3d (/ cme osm e pnt1 pnt2 pnt3 a1 b1 c1)
  (setq cme (getvar "cmdecho"))
  (setvar "cmdecho" 0)
  (command "undo" "mark")
  (setq osm (getvar "osmode"))
  (setq e (car (entsel)))
  (command "ucs" "v")
  (setvar "osmode" 33)
  (setq pnt1 (getpoint "\nPick the first point  "))
  (setq pnt2 (getpoint "\nPick the second point  "))
  (setvar "osmode" 0)
  (setq pnt3 (getpoint "\nPick dimension line location  "))
  (command "point" pnt1)
  (setq a1 (entlast))
  (command "point" pnt2)
  (setq b1 (entlast))
  (command "point" pnt3)
  (setq c1 (entlast))
  (command "ucs" "3point" pnt1 pnt2 "")
  (setq pnt1 (cdr (assoc 10 (entget a1))))
  (setq pnt2 (cdr (assoc 10 (entget b1))))
  (setq pnt3 (cdr (assoc 10 (entget c1))))
  (setq pnt1 (trans pnt1 0 1))
  (setq pnt2 (trans pnt2 0 1))
  (setq pnt3 (trans pnt3 0 1))
  (command "dim" "hor" pnt1 pnt2 pnt3 "" ^c)
  (command "erase" a1 b1 c1 "")
  (command "ucs" "p")
  (command "ucs" "p")
  (setvar "osmode" osm)
  (setvar "cmdecho" cme)
  (princ)
)
Title: Re: Strengthen the dimensioning
Post by: Kerry on September 28, 2014, 07:20:56 PM
Based on the dimensionstration, I like it.

:-)
very punny.