Author Topic: Building code charts and lisp data  (Read 1286 times)

0 Members and 1 Guest are viewing this topic.

Strydaris

  • Mosquito
  • Posts: 7
Building code charts and lisp data
« on: October 09, 2020, 12:34:00 PM »
Hey everyone,

I'm a new to the forums and still a little green when it comes to writing LISP.

Was hoping to get some advice / help here with a little LISP I'd like to put together, but I'm unsure on the best method to do what I want to do.

I work mostly with residential housing and I am looking to put together a lisp that can size my wood window/door headers and steel lintels based on the charts inside my local building code.

The idea of how I would like to run the lisp is:

1. tell the lisp what my specified snow load is for the project and keep this as a ask once question and skip it the next time I run the routine in the current session.
2. ask what the lintel is supporting. ie. Roof and ceiling only or 2 Storeys + Roof and ceiling only etc.
3. pick one side of the window opening, then pick the second side to get the distance.
4. ask if the is brick to support (So the lisp know whether or not to input the steel lintel info).
5. pick the rotation of the text to input.

Based on all this info, I was wondering what the best course of action would be to pull the information for the Building Code charts into the lisp for use.
I found an older Lisp that used the max spans of the wood headers to determine the size to be input into the drawing using COND statements. With this method it seems I would have to write a setq for every max span for every snowload. Part of the code looks something like this:
Code - Auto/Visual Lisp: [Select]
  1. (IF (/= DIST NIL)
  2.     (COND
  3.       ((AND (> DIST 0) (<= DIST 2X6MAXSPAN))
  4.        (COMMAND "-LAYER" "S" (strcat flworkly "STRUCT") "")
  5.        (COMMAND "TEXT" "J" "BC" MIDDLE 4 DEGREES2 (STRCAT "2-2X6" STEEL))
  6.       )
  7.                                         ;END FIRST CONDITION
  8.  
  9.       ((AND (> DIST 2X6MAXSPAN) (<= DIST 2X8MAXSPAN))
  10.        (COMMAND "-LAYER" "S" (strcat flworkly "STRUCT") "")
  11.        (COMMAND "TEXT" "J" "BC" MIDDLE 4 DEGREES2 (STRCAT "2-2X8" STEEL))
  12.       )
  13.      
  14.                                         ;END SECOND CONDITION
I'm just not sold on the idea that this is the best way to do it and it seems like a very inefficient way to do it.
I hope I explained this well enough.

Anyone have any ideas?
Thanks.


EDIT (John): Added code tags.
« Last Edit: October 09, 2020, 03:50:05 PM by John Kaul (Se7en) »

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Building code charts and lisp data
« Reply #1 on: October 09, 2020, 03:44:24 PM »
This is a very old routine I still use to label lintels based on their length.It may give you some ideas.
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

Strydaris

  • Mosquito
  • Posts: 7
Re: Building code charts and lisp data
« Reply #2 on: October 11, 2020, 10:13:55 AM »
Hi CAB,

Thanks for that. It really does give me ideas.
Looking at your routine, I have a few questions.
1. PLF = Points Loads acting on the Lintels?
2. What is your actual Lintel schedule? It seems very basic compared to what I have to use and I am wondering if you have to take snowloads into account. I am in Ontario, Canada so its essential and can vary on the different areas of the province.

Otherwise this is good. I was trying to avoid putting all the data into from my building code into the LISP but I may have to.

BIGAL

  • Swamp Rat
  • Posts: 1396
  • 40 + years of using Autocad
Re: Building code charts and lisp data
« Reply #3 on: October 11, 2020, 06:54:43 PM »
re structural formula a uniform load and a point load are fairly simple formulas so could be done in lisp. Let me think  5/384*w........ PL/4 you can work backwards for the I value so choose a lintel.

If you have category you must choose for loading you could try my multi radio buttons.lsp which is a library routine can be used in any code and makes selecting an option easy. Have a getvals as well which would allow input of say P L L2 E can set defaults like E=200E06

Code: [Select]
(setq ans (ah:butts but "v"  '("Choose category" "Cat1" "Cat2" "Cat3")))


« Last Edit: October 11, 2020, 07:01:21 PM by BIGAL »
A man who never made a mistake never made anything