Rhayes Posted December 16, 2008 Share Posted December 16, 2008 We have a number of Different door widths in regards to egress and I have a typical egress tag that Gives the door width and the occupancy number. My question is can you add a formula to a block att. That I can key in the door width and have the occ load number input Automaticlly.??? Quote Link to comment Share on other sites More sharing options...
lpseifert Posted December 16, 2008 Share Posted December 16, 2008 Have you thought of using a dynamic block with visibility states for each door size? or.... If you use a lisp routine to insert the block, you could prompt for the door width (attribute 1), and use a formula to determine the occupancy number and use that as the value for the 2nd attribute. Quote Link to comment Share on other sites More sharing options...
Rhayes Posted December 16, 2008 Author Share Posted December 16, 2008 A lisp routine would be nice. I do not have one that inserts a block. Do you know where i could find a lisp routine that would do that.??? Quote Link to comment Share on other sites More sharing options...
lpseifert Posted December 16, 2008 Share Posted December 16, 2008 Post your block and I'll see what I can do. Is this block inserted at a constant scale, or at the dimscale? Quote Link to comment Share on other sites More sharing options...
Rhayes Posted December 16, 2008 Author Share Posted December 16, 2008 Blocks are inserted at the Dim Scale. Thanks... Tags (2).dwg Quote Link to comment Share on other sites More sharing options...
lpseifert Posted December 16, 2008 Share Posted December 16, 2008 Ok, I notice from your blocks there are 3 attributes each 1. stair block- do you want 2 prompts, ST-X and width? is the occupancy always the width / .2? do you need "width/.2" displayed or just the width? do you need "OCC" tagged on at the end in the third attribute? 2. door block - same questions is the occupancy always the width / .15? Quote Link to comment Share on other sites More sharing options...
Rhayes Posted December 16, 2008 Author Share Posted December 16, 2008 Ok, I notice from your blocks there are 3 attributes each 1. stair block- do you want 2 prompts, ST-X and width? -YES is the occupancy always the width / .2? - YES do you need "width/.2" displayed or just the width? "Width/.2 do you need "OCC" tagged on at the end in the third attribute? Yes 2. door block - same questions is the occupancy always the width / .15? YesToday 03:23 pm Quote Link to comment Share on other sites More sharing options...
lpseifert Posted December 17, 2008 Share Posted December 17, 2008 They seem to work in the drawing you provided with the blocks you provided. Door.LSP Stair.lsp Quote Link to comment Share on other sites More sharing options...
Rhayes Posted December 17, 2008 Author Share Posted December 17, 2008 Thanks lpseifert, that was Awesome. they work great. I have a question.? If I want to change the top line of the block to Read "4 Doors @ 33" Then the second line would be (4x33) and read "132" /.15" and then the bottom would remain the same as 880 OCC. Can I add a line in the lisp that would take the Number of doors x the actual width and then take that number and / by .15 for the total Occupancy load.??? Quote Link to comment Share on other sites More sharing options...
lpseifert Posted December 17, 2008 Share Posted December 17, 2008 You'd need to create a prompt for # doors use strcat to create variable for attribute #1 edit variable for attribute #2 no time now maybe later, if you'd like. BTW, what do you mean by 'that was assume'? Quote Link to comment Share on other sites More sharing options...
Rhayes Posted December 17, 2008 Author Share Posted December 17, 2008 Sorry I have another Dumb Question.? If the block does not reside in the drawing the lisp does not work. Is there a way to insert the block if it is not in the drawing.??? Am I getting way to complacated.??? Quote Link to comment Share on other sites More sharing options...
lpseifert Posted December 17, 2008 Share Posted December 17, 2008 here's one way (if (not (tblsearch "block" "BLOCKNAME")) (command "-insert" "BLOCKNAME" (command)) ) the path of the block will need to be hard coded if it isn't in acad's search path. 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.