Jump to content

Search the Community

Showing results for tags 'dynamic block'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • CADTutor
    • News, Announcements & FAQ
    • Feedback
  • AutoCAD
    • AutoCAD Beginners' Area
    • AutoCAD 2D Drafting, Object Properties & Interface
    • AutoCAD Drawing Management & Output
    • AutoCAD 3D Modelling & Rendering
    • AutoCAD Vertical Products
    • AutoCAD LT
    • CAD Management
    • AutoCAD Bugs, Error Messages & Quirks
    • AutoCAD General
    • AutoCAD Blogs
  • AutoCAD Customization
    • The CUI, Hatches, Linetypes, Scripts & Macros
    • AutoLISP, Visual LISP & DCL
    • .NET, ObjectARX & VBA
    • Application Beta Testing
    • Application Archive
  • Other Autodesk Products
    • Autodesk 3ds Max
    • Autodesk Revit
    • Autodesk Inventor
    • Autodesk Software General
  • Other CAD Products
    • BricsCAD
    • SketchUp
    • Rhino
    • SolidWorks
    • MicroStation
    • Design Software
    • Catch All
  • Resources
    • Tutorials & Tips'n'Tricks
    • AutoCAD Museum
    • Blocks, Images, Models & Materials
    • Useful Links
  • Community
    • Introduce Yourself
    • Showcase
    • Work In Progress
    • Jobs & Training
    • Chat
    • Competitions

Categories

  • Programs and Scripts
  • 2D AutoCAD Blocks
  • 3D AutoCAD Blocks
  • Images
    • Backgrounds

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

  1. Hi. While trying to do a dynamic block of a timber flush door for a 150 and 200 mm wall, I am having a problem with the arc representing the door swing. When door is stretched, there is a gap appearing between the door panel and the arc and same also with the door frame. The more the door width increases, the more the gap. Trying to add parameter deform both door panel and the door frame at connection. Your help and input are greatly welcomed. Thanks. FlushDoor DynamicBlock.dwg
  2. Hi to all, I have a problem with a code found on the internet (the code make a similar job lisp BLOCK COUNTER ). Lisp works fine with simple blocks...but when you select blocks with attributes in the column preview section, the selected block with attribute does not show the values entered when the block was inserted. Above does not even show the real name of the initial block. Below you have a dwg file with my blocks but also the Lisp code. (defun c:BlkQty (/ blk_id blk_len blk_name blks ent h header_lsp height i j TOTAL len0 lst_blk msp pt row ss str tblobj width width1 width2 x y ) ;; By : Gia Bach, gia_bach @ www.CadViet.com ;; (vl-load-com) (defun TxtWidth (val h msp / txt minp maxp) (setq txt (vla-AddText msp val (vlax-3d-point '(0 0 0)) h)) (vla-getBoundingBox txt 'minp 'maxp ) (vla-Erase txt) (-(car(vlax-safearray->list maxp))(car(vlax-safearray->list minp))) ) (defun GetOrCreateTableStyle (tbl_name / name namelst objtblsty objtblstydic tablst txtsty) (setq objTblStyDic (vla-item (vla-get-dictionaries *adoc) "ACAD_TABLESTYLE") ) (foreach itm (vlax-for itm objTblStyDic (setq tabLst (append tabLst (list itm)))) (if (not (vl-catch-all-error-p (setq name (vl-catch-all-apply 'vla-get-Name (list itm))))) (setq nameLst (append nameLst (list name))) ) ) (if (not (vl-position tbl_name nameLst)) (vla-addobject objTblStyDic tbl_name "AcDbTableStyle")) (setq objTblSty (vla-item objTblStyDic tbl_name) TxtSty (variant-value (vla-getvariable *adoc "TextStyle"))) (mapcar '(lambda (x)(vla-settextstyle objTblSty x TxtSty)) (list acTitleRow acHeaderRow acDataRow) ) (vla-setvariable *adoc "CTableStyle" tbl_name) ) (defun GetObjectID (obj) (if (vl-string-search "64" (getenv "PROCESSOR_ARCHITECTURE")) (vlax-invoke-method *util 'GetObjectIdString obj :vlax-false ) (vla-get-Objectid obj))) ;main (if (setq ss (ssget (list (cons 0 "INSERT")))) (progn (vl-load-com) (setq i -1 len0 (while (setq ent (ssname ss (setq i (1+ i)))) (setq blk_name (cdr (assoc 2 (entget ent)))) (if (> (setq blk_len (strlen blk_name)) len0) (setq str blk_name len0 blk_len) ) (if (not (assoc blk_name lst_blk)) (setq lst_blk (cons (cons blk_name 1) lst_blk)) (setq lst_blk (subst (cons blk_name (1+ (cdr (assoc blk_name lst_blk)))) (assoc blk_name lst_blk) lst_blk))) ) (setq lst_blk (vl-sort lst_blk '(lambda (x y) (< (car x) (car y)) ) )) (SETQ TOTAL 0) (FOREACH I LST_BLK (SETQ TOTAL (+ TOTAL (CDR I)))) (or *h* (setq *h* (* (getvar "dimtxt")(getvar "dimscale")))) (initget 6) (setq h (getreal (strcat "\nText Height <" (rtos *h*) "> :"))) (if h (setq *h* h) (setq h *h*) ) (or *adoc (setq *adoc (vla-get-ActiveDocument (vlax-get-acad-object)))) (setq msp (vla-get-modelspace *adoc) *util (vla-get-Utility *adoc) blks (vla-get-blocks *adoc)) (setq width1 (* 4 (TxtWidth " " h msp)) width (* 2 (TxtWidth "Text Height" h msp)) height (* 2 h)) (if str (setq width2 (* 1.5 (TxtWidth (strcase str) h msp))) (setq width2 width)) (if (> h 3) (setq width (* (fix (/ width )8) width1 (* (fix (/ width1 )8) width2 (* (fix (/ width2 )8) height (* (fix (/ height 5))5))) (GetOrCreateTableStyle "CadEng") (setq pt (getpoint "\nPlace Table :") TblObj (vla-addtable msp (vlax-3d-point pt) (+ (length lst_blk) 3) 4 height width));CHANGE 5 TO 4 (vla-put-regeneratetablesuppressed TblObj :vlax-true) (vla-SetColumnWidth TblObj 0 width1) (vla-SetColumnWidth TblObj 1 width2) (vla-put-vertcellmargin TblObj (* 0.75 h)) (vla-put-horzcellmargin TblObj (* 0.75 h)) (mapcar '(lambda (x)(vla-setTextHeight TblObj x h)) (list acTitleRow acHeaderRow acDataRow) ) (mapcar '(lambda (x)(vla-setAlignment TblObj x ) (list acTitleRow acHeaderRow acDataRow)) (vla-MergeCells TblObj 0 0 0 3);change 4 to 3 (vla-setText TblObj 0 0 "CARTEA INDICATOARELOR RUTIERE") (setq j -1 header_lsp (list "NR. CRT." "DENUMIRE S.T.A.S. 1848-1/2011" "TOTAL INDICATOARE" "FIG. S.T.A.S. 1848-1/2011"));;;;;;;;;;;;;;;;;;;;;;REMOVE "DON VI" (repeat (length header_lsp) (vla-setText TblObj 1 (setq j (1+ j)) (nth j header_lsp))) (setq row 2 i 1) (foreach pt lst_blk (setq blk_name (car pt) j -1) (mapcar '(lambda (x)(vla-setText TblObj row (setq j (1+ j)) x)) (list i blk_name (cdr pt)));;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;REMOVE "CAI" (vla-SetBlockTableRecordId TblObj row 3 (GetObjectID (vla-item blks blk_name)) :vlax-true);CHANGE 4 TO 3 (vla-SetCellAlignment TblObj row 1 7) (vla-SetCellAlignment TblObj row 2 9);;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CHANGE 3 TO 2 (setq row (1+ row) i (1+ i)) ) (VLA-SETTEXT TBLOBJ ROW 1 "TOTAL") (VLA-SETTEXT TBLOBJ ROW 2 TOTAL) (vla-SetCellAlignment TblObj row 1 7) (vla-SetCellAlignment TblObj row 2 9) (vla-put-regeneratetablesuppressed TblObj :vlax-false) (vlax-release-object TblObj) ) ) (princ)) [ATTACH]62448[/ATTACH] Have a nice day to all ...
  3. I'm trying to make a compass, with NSEW around it. I want to rotate the compass, as well as text, dependent on the direction, however keeping the text rotation at 0. I found a similar thread, but I can't for the life of me get it to work right. I think I'm on the right track, just missing something somewhere. Any help you guys can offer is appreciated. compass.dwg
  4. I have created a dynamic block for CMU, and it works great except for one thing. Please see image below, and the attached dwg file containing the block. Goal: Remove the 'Custom' option from the Lookup drop-down. Thank you for your time, in advance! CMU_8IN.dwg
  5. Hello I have no idea where to post this so I apoligize if this is the wrong forum, but I was wondering if the following was possible: the setup is that i have a series of blocks that have multiple attributes in them, meant to get them in a list through DATAEXTRACTION. However alot of these attributes will consist out of a code, which isn't usefull to most who will see the printed plans. Is it possible to link a FIELD (or text) to the attribute and display text depending on what the value of the attribute is? (i.e. I'd make the attribute itself invisible) It would be needed that both of these texts are attributes, as they both have to be shown in the list received from DATAEXTRACT. as a random example: if the value = RAL9005 the text displays black if the value = RAL9010 the text displays white etc. Currently i have been messing with the FIELD option Diesel Expression with the following line: $(if,$(eq,$(getenv, Lookup2),test1),"abc","DEFG") Lookup is used to give a dropdown menu to select the initial text (test1) and the second attribute has to show 'abc' when 'test1' is shown on the initial attribute. (the idea was to add multiple if-functions where 'DEFG' is but i'd rather get this bit to work before going on further....) However this is not giving me any results. I suppose I dont have a grasp on how the Diesel expressions work yet so any help would be highly appreciated. thanks for any help.
  6. Hello, So the following is an example of a very nice homerun. You can bend it and it'll move the arrow accordingly, reducing time spent drafting during clean up. I'd like to make one similar to the one attached that will allow you to show the wires associated with the circuit. For those not electrically inclined, Long line = neutral Short line = hot/1phase Long line+dot = ground I think it would be nice if you could bend the homerun like the one attached but also be able to change it using a dynamic block type setup where you can chose different circuit types based on what it is powering. Is anyone savy enough with AutoCAD to do something like this? Dynamic Homerun.dwg
  7. Hey guys, So thanks to Lee Mac, I've got this stellar labeling LISP that works for a variety of situations. I need help throwing one more situation into the mix. I'd like it to have different behavior when labeling the block named "Symbol - Tree CRZ". Within this block, there is a User Parameter called "PercentImpacted" that uses an expression based on other user parameters to return a specific value. For this block, I need the leader text to say: "[Value from PercentImpacted parameter to 1 decimal place] + "% CRZ" Ex: I'd like the leader to work how the hatch component of the LISP works, wherein it asks for the user to specify the arrowhead location, rather than auto-starting at the block insertion point. And it should still allow for pickfirst action like the block labeling component does. Mega bonus points if there's a way to make the value in the leader a field that would update if the value of the user parameter changed. If pulling data directly from user parameters like this isn't possible, I can add an attribute that pulls the value from the parameter, and then the label could pull from the attribute. And commented code would would be awesome so I can unravel what does what. Trying to learn, slowly...
  8. Dear All, I have a problem replacing blocks (titleblock) which is sometimes a dynamic block. When replacing blocks with a new one i get a lselsetp nil error when there is a dynamic block involved. What i try to do is the following: - I try to replace the block by finding it by name (so no manual selection is needed because of a script) - read the coordinates of the old block - read the scale of the old block - delete the block - purge all unused blocks in the drawing - insert the new one in the drawing at the right scale and coordinates The A0KILL does work for static blocks but someone used dynamic ones in our drawings. Now i have to do these blocks by hand for 15000 drawings. Can anyone help me with this issue? (Old blockname is OHTITLE the new one OH-TITLE) (DEFUN C:A0KILL() (setq OHINS (cdr (assoc 10 (entget (ssname (ssget "X" '((2 . "OHTITLE"))) 0))))) (setq OHX (cdr (assoc 41 (entget (ssname (ssget "X" '((2 . "OHTITLE"))) 0))))) (setq ss (ssget "X" '((0 . "INSERT")(2 . "OHTITLE")))) (command "_.erase" ss "") (repeat 3 (command "_.purge" "_B" "*" "_N") ) ; end repeat (command "-insert";Command "K:\\AutoCAD Standaard\\2014\\ALGEMEEN\\Kaders\\Titelh\\Nederlands\\A0\\OH-TITLE.DWG" ;Block Name OHINS OHX "" ) (setq OHINS nil) (setqoh OHX nil) (setq ss nil) )
  9. Hi all, I have 4 dynamic blocks and each has 4 different visibility states. I would like to create a dynamic block which contains the previous 4 dynamic blocks and where I can set the different blocks different visibility states (like the drop down menu). Is it possible somehow? Or should I make all of the possibilities visibility states? Please help if you can! Thank you!
  10. I have made a block that has been used in several drawings by several people. As the months have gone on and people have used these, some changes have been made to the blocks in the specific drawings. My question is this... Is there a way to update these globally? Almost like an XREF does but obviously not using an actual XREF. The only thing that i can think to do is every time one gets updated in a drawing, go into each drawing that the block resides in, delete them all, purge, reinsert, and have a copy party. Problem is, people change them without anyone else being informed...any ideas?
  11. i would like to know how to scale a block posted below i would like to be able to have a drag feature that makes the block bigger in the x axis only this will also scale the spline in the middle of the block in the x axis only. M0213.dwg
  12. Hello guys, I am trying to increase performance of my work by making some dynamic blocks, unfortunately I have faced a wall :/ I want to make a block with an option to make ONE of it's attribute printable/unprintable (By unprintable I mean for it to be like on defpoints layer), without "hiding" the rest of the block. I tried the "easy way" by changing the layer of the block (in blockeditor everything except THE attribute on specific layer, THE ATTRIBUTE - "0") but then when I switched in model layer to defpoints it doesn't print this block at all. I tried also adding a visibility state, but it looks like it doesn't work well when there are multiple entities of the same attribute (in other visibility states) in one block definition. Is there a way of changing a layer of element for example in lookup parameter? Or maybe somebody can come up with other solution? Regards rusi55
  13. Hello, I created a dynamic block with arrows and an attriboute text. I had to use multiline text because I need background. When I rotate the block the text is not in the good direction on the left side (the other three way is ok). Is it a way to orient to the readable way the attriboute text somehow in the rotated block? Thanks for the answers! TB arrow.dwg
  14. Hi, I have created a dynamic block and it all works how I want it to. It has a number of lookups/visibility states and I was wondering if there was a way of asking the user which properties they would like to select as they insert the block? This would help save time as the user can input the properties they require for each lookup/visibility state at the beginning instead of bringing in the block and then selecting each individual lookup. Thanks.
  15. Pizza! My block is a simple arc that can be swept around a circle and retain an enclosed area, like an adjustable piece of pizza. It works fine as long as I drag the grip, and mostly the input works too but there are certain sequences that mess it up, going past 180° mainly. Drag it to 90°, then type 340, it makes a concaved arc with a 20° fill, not 340°. At this point I have to do some undos because all input now makes a V with a huge bulge except back to 45° sometimes, well, I am including the file so you can see. I have lots of constraints to keep any of this from happening, there are no over-constraint warnings. The original horizontal line from 0,0 to 1,0 is constraint locked, but it can flip to -1,0 if done in the right (or wrong) sequence, the arc is inverted to a pline and constrained concentrically to a circle (on a different visibility state-off). I have learned over the years how quirky dynamic blocks can be, but some of them take so long to debug, it negates any time I'd save by just using multiple blocks, like many times over. Eventually I would like to put a polar array of slice cutlines every 30°, a nightmare of its own, tried it already, ugg. Please debug this somebody! Thanks much! R.L.Hamm Pizza Dynamic Block.dwg
  16. i remember in my old company, i used to insert dynamic block from tool palette. I use to select two points on model space to select the length of beam i needed. how to do that ? I made blocks, but when i insert, a window opens up and asks for length. I want to select two points on model space to specify the length of beam, instead of entering the length in numbers.
  17. Hello all, I have a dynamic block with a problem. The block can now stretch and rotate, but in the center of the block there is an object that should always be in the center of the lines. How does this needs to be done? Can it be without parameters to? Kind regards, D.M. Str_Ro_MP.dwg
  18. i can use VB.net to edit normal inserted block reference's attribute textstring but it's not working for dynamic block, pls help. Best regard.
  19. Hi all, I am new to the forum, but a long time user of AutoCAD. I have a question concerning dynamic blocks. I have created a block that has a couple of rotational points, but I don't want them to rotate 360°. One of the points can only be rotated 110° CW and CCW, the other 145° CCW and 150° CW. The question is can this "Can you actually put a constraint on these points so that they can't be rotated past these angles?" Thanks
  20. Hello all, I have the following issue: When working with dynamic blocks, the file get's bigger fast. We have huge drawings in our company due to big projects. This is why I'm asking if it's possible to do something like an 'explode' on your dynamic blocks but without losing the 'blocks'. So if you have 3 dynamic blocks -> EXPLODE -> 3 sepperated blocks Without changing anything. Can you help me? PS. Block file in attachment. TestBlock.dwg Thanks!
  21. i want my attribute to rotate from 90 to 270 using flip action. but when i added a flip action on my attribute, the action only works on newly inserted blocks. when i created as new text,mtext or attribute inside a block, any flip action doesnt work, and keeps its rotation. how can i make it work?help.dwg
  22. Does anyone know a clean way to toggle a specified flip parameter using auto lisp visual lisp? I use the getdynprops, getdynpropvalue, putdynpropvalue [by Jeff Mishler based on code from Steve Doman, Herman Mayfarth and Tony Tanzillo] for most of my dynamic block changing needs but I can't get it they don't seem to work for the flip parameter.
  23. Hi all, i've been struggling with my new project to automate my drawings. I hope i can explain well what i want so here goes: I want my dynamic array to NOT show the first object of my array. it sounds weird i know, but the thing is, the array should start showing up after the lenght of the tube passed the 5 meter mark. so if the tube is ony I cheated a bit with a wipeout on the first array object, but that way i still get the object when i DX the drawing. So it's not really wat i want to achieve. I hope you get what i'm trying to achieve and have any idea on how to do this. Thanks in advance, Bob Buis 12 x 10 PVC 16Bar glad.dwg
  24. Hello everyone, So I work in a cabinet shop as a drafter. I am trying to save time drawing our shop drawings using dynamic blocks. I have been trying all morning and researching through forums with no luck. I have simple 3/4" MDF slab doors and I need a block that can divide the doors between 10" to 20" equal widths with 1/8" space between the doors. In essence I will need 2 blocks, one for the plan section and one for the elevation, the same concept applies. Previously I would use the divide command after subtracting all 1/8" reveals to manually get equal doors. I will greatly appreciate if someone can help me and ease the process. Please see attachment to see what I am trying to resolve. Thank you,Auto Cabinet Door Division.dwg
  25. I have a rectangular device tag with polylines as wires. I want to rotate the wires, but since the device is rectangular, I end up with spaces at 90 and 180 degrees. Any suggestions would be greatly appreciated. Motion Detector.dwg
×
×
  • Create New...