Strydaris Posted October 9, 2020 Share Posted October 9, 2020 Hey everyone, I'm 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: (IF (/= DIST NIL) (COND ((AND (> DIST 0) (<= DIST 2X6MAXSPAN)) (COMMAND "-LAYER" "S" (strcat flworkly "STRUCT") "") (COMMAND "TEXT" "J" "BC" MIDDLE 4 DEGREES2 (STRCAT "2-2X6" STEEL)) ) ;END FIRST CONDITION ((AND (> DIST 2X6MAXSPAN) (<= DIST 2X8MAXSPAN)) (COMMAND "-LAYER" "S" (strcat flworkly "STRUCT") "") (COMMAND "TEXT" "J" "BC" MIDDLE 4 DEGREES2 (STRCAT "2-2X8" STEEL)) ) ;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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.