TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: Sam on July 21, 2011, 03:28:51 AM

Title: landscape
Post by: Sam on July 21, 2011, 03:28:51 AM
dear all,

how can Crete this lisp?
Title: landscape
Post by: Sam on July 21, 2011, 03:31:21 AM
cont..
command : jglh

website : http://bbs.mjtd.com/thread-85273-1-3.html (http://bbs.mjtd.com/thread-85273-1-3.html)
Title: Re: landscape
Post by: jaydee on July 21, 2011, 03:53:26 AM
Pretty amazing, and seems like all drawn using geometries, no blocks involve. Looks like not just programming skills required, also require alot of maths skill as well.
What a pitty, Im not a landscape cadd, otherwise i will be begging for it to be in my toolset.
Title: Re: landscape
Post by: kruuger on July 21, 2011, 04:19:20 AM
dear all,

how can Crete this lisp?
ask author. maybe you can buy this stuff (maybe it is for free).
BTW it is pretty cool :)
kruuger
Title: Re: landscape
Post by: butzers09silverado on July 21, 2011, 08:37:42 AM
I'm a licensed Landscape Architect... tell me more about this, seems very useful.
Title: Re: landscape
Post by: MeasureUp on July 22, 2011, 12:40:56 AM
dear all,

how can Crete this lisp?
ask author. maybe you can buy this stuff (maybe it is for free).
BTW it is pretty cool :)
kruuger
I think Sam is the author.  :-)
BTW I donwloaded and loaded it but it doesn't work.
Quote
; error: no function definition: XYP-DCL-FAST0
Title: Re: landscape
Post by: Sam on July 22, 2011, 12:54:47 AM
dear all,

how can Crete this lisp?
ask author. maybe you can buy this stuff (maybe it is for free).
BTW it is pretty cool :)
kruuger
I think Sam is the author.  :-)
dear sir,
im not author & im not programmer im just user
any query contact mr. xyp1964
http://xyp1964.ys168.com (http://xyp1964.ys168.com)
Title: Re: landscape
Post by: Lee Mac on July 24, 2011, 08:48:03 AM
(http://www.theswamp.org/index.php?action=dlattach;topic=38955.0;attach=20135;image)

Code: [Select]
(defun c:test ( / d e )
  (setq e (entlast))
  (command "_.spline")
  (while (= 1 (boole 1 1 (getvar 'CMDACTIVE))) (command pause))
  (if
    (and
      (not (equal e (setq e (entlast))))
      (setq d (getdist "\nSpecify Offset: "))
    )
    (progn
      (setq e (vlax-ename->vla-object e))
      (vlax-invoke e 'offset d)
      (vlax-invoke e 'offset (- d))
      (vla-delete e)
    )
  )
  (princ)
)

 :-)
Title: Re: landscape
Post by: pBe on July 24, 2011, 09:01:00 AM
How in the world did you know the lines will trim itself? 

Thought it would be more complicated than that?
I honestly dont know where to start with this one. i was thinking more of grdraw/grvecs thingy.

Very nice Lee  8-)

EDIT: the logic behind your code is insanely simple (wouldnt have thought of that if i tried) kudos to you Lee (clap clap clap)


Title: Re: landscape
Post by: Tharwat on July 24, 2011, 09:07:32 AM
Lee . you did blow up the Balloon  :lmao:

Very nice .
Title: Re: landscape
Post by: Lee Mac on July 24, 2011, 10:00:22 AM
Thanks guys  8-)
Title: Re: landscape
Post by: Sam on July 25, 2011, 01:11:26 AM
Code: [Select]
(defun c:test ( / d e )
  (setq e (entlast))
  (command "_.spline")
  (while (= 1 (boole 1 1 (getvar 'CMDACTIVE))) (command pause))
  (if
    (and
      (not (equal e (setq e (entlast))))
      (setq d (getdist "\nSpecify Offset: "))
    )
    (progn
      (setq e (vlax-ename->vla-object e))
      (vlax-invoke e 'offset d)
      (vlax-invoke e 'offset (- d))
      (vla-delete e)
    )
  )
  (princ)
)

 :-)


Dear Sir lee mac
it's very nice thx
Title: Re: landscape
Post by: butzers09silverado on July 25, 2011, 07:47:03 AM
genius... show off.... just kidding nice work Lee  8-)
Title: Re: landscape
Post by: Lee Mac on July 25, 2011, 07:59:25 AM
Thanks guys, it was nothing really  :-)
Title: Re: landscape
Post by: bchapman on September 15, 2011, 11:58:21 PM
Easy enough to create custom linetypes with symbols (colored however you want) and use a block legend, but the following mimics his arrow routine I think.

FYI... I'm not the best coder, but here's what I came up with:

Code: [Select]

(defun c:trail1 ()
(setq lastEnt (entlast)) ; place marker for routine for grouping
(command "-layer" "new" "BC-LSTRAIL1-L" "set" "BC-LSTRAIL1-L" "Color" "240" "BC-LSTRAIL1-L" "")
(command "spline" (while (= (logand (getvar "CMDACTIVE") 1) 1) (command pause)))
(setq spln (entlast))
(setq ent (vlax-ename->vla-object spln))
(setq endpt (vlax-curve-getEndPoint ent))
(command "-layer" "new" "BC-LSTRAIL1-S" "set" "BC-LSTRAIL1-S" "Color" "240" "BC-LSTRAIL1-S" "")
(setq scale (getvar "dimscale"))
(setq space (* scale 0.1))
(setq lastEnt2 (entlast)) ; place marker for routine for scaling
(command "measure" spln "block" "BRIANS_LS-BOX1" "Y" space)
(setq ss2 (ssget "p"))
(setq cntr2 0)
(while (< cntr2 (sslength ss2))
(setq ent2 (ssname ss2 cntr2))
(setq entlist2 (entget ent2))
(setq scpntlist (assoc 10 entlist2))
(setq scpnt (cdr scpntlist))
(command "scale" ent2 "" scpnt scale)
(setq cntr2 (+ cntr2 1.0))
)
(command "-insert" "BRIANS_LS-ARROW4" endpt scale "" pause)
;;group here
(setq ss (ssadd))
(while (setq lastEnt (entnext lastEnt))
(ssadd lastEnt ss)
)
(sssetfirst nil ss)
(command "-group" "" "*" "" ss "")
(command "layer" "off" "BC-LSTRAIL1-L" "")
(princ));;;;



dear all,

how can Crete this lisp?
Title: Re: landscape
Post by: stevesfr on September 16, 2011, 07:48:16 AM
would be neat if you would give us the "blocks" used in trail1.lsp  !  :?