Guest Posted September 29, 2020 Posted September 29, 2020 I find in cadalyst https://cadtips.cadalyst.com/misc-user-tools/tip-2302-draw-stair-sections a draw stair section lisp. This lisp code is not in meters. Can any one convert this code to work in meters ? Thanks StairSec.dcl StairSec.lsp StairSec.slb StairSec_Try.dwg Quote
pkenewell Posted September 29, 2020 Posted September 29, 2020 (edited) Without running this I think the original output is in feet? Not tested but try this: Change line number 256 in the code (within the function called "str_display") from: (command "text" "" (strcat "Overall Height: " (rtos ftf_n 4 4))) to this: (command "text" "" (strcat "Overall Height: " (rtos (* ftf_n 0.0254) 2 4) " Meters [" (rtos ftf_n 4 4) " Feet]")) EDIT: Corrected units display. Edit 2: Oops - Raw output is in inches - changed conversion Edited September 29, 2020 by pkenewell Quote
Guest Posted September 29, 2020 Posted September 29, 2020 Hi pkenewell. Thanks for the help. Is not so simle. Dcl file need changes ,and the dwg file need changes Quote
BIGAL Posted September 29, 2020 Posted September 29, 2020 733 posts you should be able to do it I am out for extended lunch. Quote
pkenewell Posted September 30, 2020 Posted September 30, 2020 17 hours ago, prodromosm said: Hi pkenewell. Thanks for the help. Is not so simle. Dcl file need changes ,and the dwg file need changes The changes needed would strongly depend on what your UNITS settings are. The sample drawing was set up in Architectural units and scaling, with the MEASUREMENT system variable set at 0 (Imperial). Other than the inches labeled in the dialog box, the original program would change based on what your UNITS settings were. The output text would still output the incorrect info, but the values in the dialog would be correct to whatever units you are using - consistently. The questions are: 1) Do you scale literally in Meters for all measurements, or do you scale in mm or cm and convert to meters? 2) Are you wanting to enter mm or cm for some values in the DCL, or all in Meters? 3) Do you use the MEASUREMENT system variable to determine Imperial or Metric? Quote
Guest Posted September 30, 2020 Posted September 30, 2020 Hi pkenewell. I use all the time meters for example Rise Height ( 0.20m ) and Tread Depth (0.30m) Thanks Quote
pkenewell Posted September 30, 2020 Posted September 30, 2020 Ok - try this. I can't say if it will work in all situations. I haven't tested it thoroughly. You will also have to play with the output text height to suit your needs. NOTE: You must set your MEASUREMENT variable to 1 so the program knows you are working in Metric. StairSec.zip Quote
BIGAL Posted September 30, 2020 Posted September 30, 2020 A couple of comments if the dwg is architectural and is in mm then rtos would always be 2 0 for lengths etc notice still a few rtos 4 4 ? Why convert ft to mm (rtos (* ftf_n 0.0254) 2 4) work in mm totally. Lastly stairs do not have fixed height tread & width rather they must meet a code of practice that takes into account rise run ratios did not see that obviously in the code, happy to be told I am wrong. With say a fixed start and top point often stairs will fail the code check so the designer must look at what to change. Quote
pkenewell Posted October 1, 2020 Posted October 1, 2020 (edited) @BIGAL I appreciate your comments. I don't pretend to know Architectural codes and the rules for stairs. I was just trying to accommodate prodromosm in his original post that the program was working for him, but he just needed to convert from Feet to Meters. In my tests - the conversion factors seemed to work when the sample drawing was scaled for Meters. Note: If he was wanting to work in Meters, then the sample drawing was incorrect being in Architectural units which are made for Imperial measurements. Please correct me if I am wrong, but Meters should be expressed in decimal units with the MEASUREMENT system variable set to 1 for Metric. The only time I use (rtos nnn 4 4) is on the text output, where I expressed the total height using dual units. Not necessary just a convenience so I could see the program was converting correctly. On the area where i am using (rtos (* ftf_n 0.0254) 2 4) is converting INCHES to Meters. Because if you are working in Feet in architectural units, in decimal terms you are really working in Inches (per the sample drawing & the default values in the original program). As you said - The OP should be able to figure out how to adjust the program now for his needs. However - If you have any insights in how to make the program work better - feel free to contribute them. Edited October 1, 2020 by pkenewell Quote
BIGAL Posted October 1, 2020 Posted October 1, 2020 I avoided editing it as I have a stair routine its part of a package, working in metric is so much easier you do not do any converting hence 25.4mm is not needed set the units correct to start is most important as you say. If its just a tread height / run then its a simple zig zag pline For AUS, AS1657 2018 section 4 Stairways you have to pay to get the std. This is an example https://stepform.com.au/as1675-2018/stairs-detail.html Quote
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.