Search the Community
Showing results for tags 'dymamic block'.
Found 4 results
Hello, I have two reactor and two problems in callback functions. I have inserted same princ to be evident where is the error. Outside (from CallBack func reactors) they works properly. It seems that some LISP function are not compatibile to work in callback func (vlax-ename->vla-object, vla-update). My callback func.: - AppendBkAreaLst - when I copy an object included in _AreaBkLst, must add the new one to reactors : execution broke on line :(setq obL(vlax-ename->vla-object(entlast))) : message> 1 <Entity name: 1edac8b6420>2 ; error: Automation Error. Description was not provided. - CopyAreaBkReactor - when I modify a DynBlk parameters, update the area field attribute : execution broke on line: (vla-update ob) : message>!begin! ; error: Automation Error. Object was notifying : although, the field are updated, but report an error _AreaBkLst - global var - a lst with dyn blks ;------------Setup Reactors----------- (setq ModifyAreaBkReactor (vlr-object-reactor _AreaBkLst "ModifyAreaBkReactor" '((:vlr-modified . UpdateBkArea)))) (setq CopyAreaBkReactor (vlr-object-reactor _AreaBkLst "CopyAreaBkReactor" '((:VLR-copied . AppendBkAreaLst)))) ;------------Functions---------------- (defun AppendBkAreaLst (ob re Rlst / obL) ;at >COPY add new Blk to reactor /Callback fun (princ "1 ") (princ(entlast)) (princ "2 ") (setq obL(vlax-ename->vla-object(entlast))) (princ "3 ") (vlr-owner-add ModifyAreaBkReactor obL) (vlr-owner-add CopyAreaBkReactor obL) (princ)) (defun UpdateBkArea (ob re Rlst / ) ;when modify parameters- update area field /Callback fun (setq BC(BlockComponents (vla-get-name ob) "")) (setq obS(vlax-ename->vla-object (nth 5 bc))) (setq Area (vlax-curve-getarea(car BC))) (vla-put-TextString obS Area) (princ "\n!begin! ") (vla-update ob) (princ "ok")(princ)) (defun BlockComponents ( blk typ / ent lst ) ;lst all enteies inside blk (setq typ (strcat typ "*")) (if (setq ent (tblobjname "block" blk)) (while (setq ent (entnext ent)) (if (wcmatch (cdr (assoc 0 (setq enx (entget ent)))) typ) (setq lst (cons ent lst))))) (reverse lst))
I am attempting to create a Dynamic Block for electrical home runs that behaves similarly to the home runs my company uses in Revit. Essentially it is a Spline with (3) Control Vertices and an Arrowhead at opposite end from the Basepoint. I have created the Dynamic block to include the desired visible elements and I've gotten the Spline to behave correctly using Stretch Actions. The only problem I am having is that I can't get the Arrowhead to follow the end of the Spline correctly. I would like it to "bend around" with the Spline but it wants to stay at a fixed angle. If anyone can point me in the right direction (pun intended) or modify the attached example of my Dynamic Block, that would be appreciated. Also, I am aware there is an Mleader Style that utilizes a Spline instead of a straight line. However, the Spline is based on Fit Points instead of Control Vertices and simply does not behave the way we need it to, thus the reason for the Dynamic Block. Thanks! HOME-RUN.dwg
jaff posted a topic in AutoCAD Drawing Management & OutputHi everyone, My intent in the dynamic block is to be able to show or be able to copy some elements within the dynamic block, please see attached dwg. The block represents a shear wall (structural element) that contains anchor bolts which are represented by the red dots. So, if I have a shear wall on the first floor I'd like to be able to show just the anchors bolts on the foundation plan. Very much appreciated, WSW.dwg
Hello, I'm having a hard time finding the solution for my problem. I want to create a dynamic block in Autocad 2014 In this block I need to determine the intersection between 2 lines. In the sample you'll see my problem. I want to make A, B and C variables in my block. The angle on top is always 90 degrees. With this information I can draw everything, but I don't know how to make the intersection properly, and keep it clean when manipulating the variables. Variable A has to be positive between 1 and 89 degrees, there are no restrictions on the variables C. Any help is much appreciated mvrp350 intersection problem.dwg