RBrigido Posted October 16, 2023 Posted October 16, 2023 (edited) My idea is to use a lisp routine that asks me the sides of the window, when clicking on them, the block between the walls will be inserted. In every situation that I need to do this, the walls are not equal in size or angle, so I created a dynamic block with the "distance1" attribute, which can be easily moved, however I would like to know if there is a possibility of using the lisp routine to change the attribute dimension. • This is the lisp routine: (defun c:cww () (setvar "cmdecho" 0) (setq side1 (getpoint "\n\n\n\nSelect the right side of the window: ")) (setq side2 (getpoint "Select the other side: ")) (setq snapang-radians (angle side1 side2)) (setq snapang-degrees (* snapang-radians (/ 180.0 pi))) ; Inverts the angle sign (setq windowang (* snapang-degrees -1)) (command "_.insert" "Window Magic" side1 "" "" windowang) (setvar "cmdecho" 1) (princ) ) • This is the block with the attribute • This is an example of a place If anyone could help me, I'll really appreciate it. Kind regards, Rodrigo Brigido. Edited October 17, 2023 by RBrigido Quote
RBrigido Posted October 17, 2023 Author Posted October 17, 2023 11 hours ago, BIGAL said: Is this what your trying to achieve ? Hi Bigal No, that's not what I'm trying to achieve. My idea is to change the Block attribute "Distance1" to the difference between 2 sides. I'm using the BricsCAD Pro like you. Follow the video above to see what I'm trying to achieve. Recording #9.mp4 Kind regards, Rodrigo Brigido. Quote
lastknownuser Posted October 17, 2023 Posted October 17, 2023 (setq dist (distance side1 side2)) (setq diststr (rtos dist 2 2)) Then you just have to add distance value to block on insert, I don't use BricsCAD so not sure if inserting dynamic block works the same as AutoCad Also check this, could be helpful: https://www.lee-mac.com/dynamicblockfunctions.html#setdynamicprops Quote
RBrigido Posted October 17, 2023 Author Posted October 17, 2023 1 hour ago, lastknownuser said: (setq dist (distance side1 side2)) (setq diststr (rtos dist 2 2)) Then you just have to add distance value to block on insert, I don't use BricsCAD so not sure if inserting dynamic block works the same as AutoCad Also check this, could be helpful: https://www.lee-mac.com/dynamicblockfunctions.html#setdynamicprops Hi lastknowuser, I checked, but I couldn't do it through BricsCAD, I believe there are some differences, for example vl-some doesn't work in BricsCAD. I believe @BIGAL can have wonderful ideas. Quote
BIGAL Posted October 17, 2023 Posted October 17, 2023 (edited) The answer is in lee-mac dynamic functions they do work with Bricscad. You should be able to reset say distance1 and distance2 or even d2 d3 d4 for a typical 4 line wall. The image above is drawing in plan view, enter window details and it auto draws not a block, breaking wall lines, takes into account any wall sizes as these can be simply set by dragging over wall lines then draw window. The window in elevation is auto generated. as part of making the dwg. Multi pane supported. Zoom in can see walls. (defun LM:setdynpropvalue ( blk prp val ) then (LM:setdynpropvalue obj "Width" wid) (LM:setdynpropvalue obj "Height" ht ) My V20 Bricscad does not have Dynamic block edit need later version. So rely on clients then do lisp etc to match. Edited October 17, 2023 by BIGAL 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.