Jump to content

Recommended Posts

Posted (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

image.thumb.png.70406d3fc2830acaa4cf196708cec059.png

 


• This is an example of a place

QuerieWindow.thumb.png.fbb9b5b3657a7925a1decfb584e8c825.png

 

 

If anyone could help me, I'll really appreciate it.

 

Kind regards,

Rodrigo Brigido.

Edited by RBrigido
Posted
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.

 

Kind regards,

Rodrigo Brigido.

Posted
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.

Posted (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 by BIGAL

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...