Jump to content

Creating an Auto Lisp command to create stud rails in Auto Cad 2020 - Beginner with drawing could use all the help I could get.


Recommended Posts

Posted

Hey everyone,

 

Not sure if you everyone is familiar what is stud rail is in the construction industry but they reinforce the load of concrete surrounding columns so they don't have to pour more concrete around the column to support the slabs. I have attached an image of an example below. 

 

I'm looking to create an auto lisp to draw out stud rails in Auto Cad 2021. The parameters that are given are the rail width, rail length, number of studs per rail, stud diameter, stud spacing (center to center), end spacing (end of rail to center of first stud), and there is also a nailing hole which is a 3/8" dia circle 1" from the end of the rail to center of hole on both ends. If someone would be kind enough to point me in the right direction or set me up with a draft for an auto lisp that would be greatly appreciated. 

 

Let me know if you need anymore information and I will provide it.

 

Screenshot2024-01-04144720.png.d9552cb455e9dfe79b9ff887ea252a27.png

 

Thanks,

Zach

Posted

Its a fairly simple shape to draw using lisp. You get a width and height draw a rectang, draw the nail holes, then say use donuts to draw the solid circles.

 

So a good task to start to learn lisp, please others dont post code. Rather provide hints.

 

So you start with (setq wid (getreal "\nEnter width ")) then add the rest, rail width, rail length, number of studs per rail, stud diameter, stud spacing (center to center), end spacing (end of rail to center of first stud). One comment if you imply number and end space then no need for spacing as you would calculate that value. I will later on provide a smarter dcl for the input.

 

So you have all the values next is pick point (setq pt1 (getpoint "\npick a point ")) I get a piece of paper and do a sketch then write down the ptx number so as I work out say a new X & Y for the holes I write the point number on the sketch. then I know where I am reusing a point, I will give you this function an easier way to add X & Y to a point, (setq pt2 (mapcar '+ pt1 (list X Y 0.0))) just replace X Y with new offset value.

 

The donuts work out 1st point XY, then use (repeat and copy again adding a new Y which is the spacing value.

 

Hope that makes some sense. If you get stuck just post there are plenty of people here who will help. You can use notepad or I use Notepad++ as it has a lisp checker, or use Vlide the inbuilt lisp editor. For Bricscad its Blade.

 

 

  • Like 1

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