Lisp to create a stone wall

Lisp to create a stone wall

Ryan207
Enthusiast Enthusiast
2,673 Views
7 Replies
Message 1 of 8

Lisp to create a stone wall

Ryan207
Enthusiast
Enthusiast

Hi,

Looking to find a lisp to create a irregular shaped stone wall in plan view.  I've found a list on Cadalyst (Tip #1108) that may work.  Original Author was Robert A. Perruzzi (1995).  I'm not sure what I need to do to update this lisp so that it will work with my AutoCAD Civil3d  2016 program. 

 

Thanks 

0 Likes
Accepted solutions (1)
2,674 Views
7 Replies
Replies (7)
Message 2 of 8

ВeekeeCZ
Consultant
Consultant
Accepted solution

The only issue is a file path. Rename your block to "_swl", put it into autocad's searchable path, or insert into drawing manually.

The see the *.lsp in notepad and change

 

this

(defun drawstn ()
(command
"insert" "\\acad12\\_swl" SP SCSIZE SCSIZE WANGLE);; revise directory to suit
)

 

to this

(defun drawstn ()
(command
"insert" "_swl" SP SCSIZE SCSIZE WANGLE);; revise directory to suit
)

0 Likes
Message 3 of 8

Ryan207
Enthusiast
Enthusiast
Thanks! That did it.

One more quick question. Can this be updated to work with polylines?
0 Likes
Message 4 of 8

Kent1Cooper
Consultant
Consultant

@Ryan207 wrote:
.... Can this be updated to work with polylines?

That's very specific to use with a Line entity only [and, if I may say so, uses a pretty frighteningly complicated way of finding its start and end points].  It could be modified to work with Polylines, but since it uses a linear Array, just changing the way of finding endpoints would only work with one-line-segment Polylines, so an entirely different kind of modification would be needed for multi-segment Polylines that change direction or include arc segments.

 

I would suggest you simply Insert a Block [or just draw an Ellipse, since that's what their Block simulates] at the end of whatever kind of path object you want, size it as you like, and use ARRAYPATH.  Then you wouldn't need yet another version of the routine if you want to do it on an Arc, or Circle, or Ellipse, or Spline, or....

 

If you don't want the single-entity result of ARRAYPATH [which has big advantages, in adjusting itself if you change the path, editability of spacing, etc.], use DIVIDE or MEASURE with the Block option to get independent stones along the path.

Kent Cooper, AIA
0 Likes
Message 5 of 8

john.uhden
Mentor
Mentor

I thought that Land Desktop and maybe Civil 3D had a stone linetype definition.  I no longer have either installed and I don't remember the definition, but I think all you need is an elliptical shape, which if you don't have one, I think you can make.

John F. Uhden

0 Likes
Message 6 of 8

Ryan207
Enthusiast
Enthusiast
Thanks! I’ll look into this method.
0 Likes
Message 7 of 8

Ryan207
Enthusiast
Enthusiast
Yes they do. Most of my clients are ok with that symbol for rock walls. I
have a client that prefers the rock walls to visually look more like
rocks. So every time I have to draw a rock wall. I create a few boulders
to scale and then copy and place them in random order for the length of the
wall to achieve the look he’s after.
0 Likes
Message 8 of 8

john.uhden
Mentor
Mentor

Well then maybe create several different random shapes and put them in your linetype definition.  I think definitions can take up to 5 shapes.  It would be so much easier to deal with polylines than individual block insertions along the path of a polyline.  Though I guess we could create a reactor to modify the block insertions relative to a no-plot polyline.  But that sounds like a kludge to me.

John F. Uhden

0 Likes