Jump to content

Search the Community

Showing results for tags 'dynamic block'.



More search options

  • 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

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Found 90 results

  1. Hello! I'm trying to create a dynamic door with a 25 degree opened angle, however, I also want to be able to stretch the door while flipped horizontal/vertical. This is where I'm having trouble. I can only stretch the width of the door if both or none of the axis are flipped. If I flip it horizontally the door leaf does not stretch in the same angle. Does any body know how to correct this? I have checked the sample doors in Autocad that are opened 90 degrees, and they work with flipping. Not sure if it has to do with the 90 degrees or some other thing they have done. As a bonus, if you could help me with one other thing... I also would like it if the flip would continue to stay centered even if I stretch the width or depth. So if I stretch the door from 700mm to 900mm it would not offset when flipping it, and if I would change the depth of the door it would stay centered on the wall. Please point me in the right direction if you could! DWG of the door is attached. Thanks! dynamic_door.dwg
  2. See screenshots. How do I place the lookup in an ordered manner? Thanks in advance.
  3. Dear Members, I have some stretchable dynamic Blocks. I would like to insert and change the length of them in command line. (without use my mouse and grip points) i havent got any problem with the insertation but i cant change the length of this bloks without using mouse. in Properties window there is a section (custom) where i can change the length of the blocks but when i type in command line: change-properties, there i cant find it. just the following options: color, elev, layer, ltype, ltscale, lweight thickness, transparency, materia, annotative Do you have any idea, how could i manage this problem? thanks your answer
  4. Hi, I want a LISP routine which can insert blocks along the polyline. I have two dynamic blocks. They are 'Straight Duct' and 'Elbow90'. Consider I draw a polyline with three XY coordinates i.e. (1,1) , (1,2) and (2,2) and insert rectangular block with desired 'Width'. Here are list of things I want from LISP program: 1. I want 'Straight Duct' to be inserted at mid-points of '(1,1) & (1,2)' and '(1,2) & (2,2)'. 2. Also, those inserted blocks should be rotated with an angle made by those points with horizontal so that 'Straight Duct' remains along the line. Example, Angle made by line joining points '(1,1) & (1,2)' with horizontal is 90 Deg. Hence, Dynamic Block should be rotated by 90 degree about midpoint. 3. Move the grip of 'Straight Duct' (which facing to open end of polyline) to the open end of polyline. Move other grip of 'Straight Duct' to the length of (150+ Width/2) mm less than the intersection point. 4. Insert 'Elbow90' at the point with polar angle 45 Degree to point of intersection and polar radius (150 + Width/2) mm. Also, the grip of elbow should be moved so that width of 'Elbow90' should be as same as that of 'Straight Duct'. Pls refer the attached file for understanding the problem. Can anyone help me out? HVAC Dynamic Blocks 24.04.2018.dwg
  5. Hi All, I'm very new to these so please be nice! Basically our company cuts heaps of metal panels. We draw each panel, do the cutting lists, nest and optimise them on sheets manually. I'm trying to save some time by creating a block that'll make life a bit easier. So I've currently got a block where you can input the height and width & it automatically adjusts. What I'd like to add is an atrribute? or a tag? where that little box pops up and you can input the height & width in there instead. Additionally I'd like the pop up box to include the panel # which is then shown on the panel (see drawing where I've just added in 'a1', 'a2' etc). Next step would be to include a table that collates the information from all the panels (we often do around 30 panels per order). Currently we manually input all the sizes in to excel. Just to make things more interesting we use metric autocad but are often given dimensions in imperial, so half the time is spent manually converting feet & inches into mm and then drawing the panels in mm. If there's any way to input in imperial and show both metric and imperial on the dimension line that would just be the best thing ever! I might be being a bit greedy with so many requests so if anyone could help with just one of the above it would be very much appreciated. Thankyou trial.dwg
  6. Anyone know of a .lsp that can rename some text in a dynamic block similar to tcount? I have data racks in a line and they're all dynamic blocks with the default "XX" in the middle. I was wondering if there is a lsp to automate this similar to tcount? example (all dynamic blocks with text in the center - as part of the block itself):
  7. 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
  8. 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 ...
  9. 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
  10. 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
  11. 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.
  12. 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
  13. 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...
  14. 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) )
  15. 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!
  16. 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?
  17. 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
  18. 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
  19. 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
  20. Hello! Quick FYI: (1) I am a brand new forum member, but I have looked up CAD issues on CADTutor various times! (2) I believe myself to be an intermediate level skilled CAD user Goal: I am trying to create a dynamic block of plywood that can be rotated, lengthened, and thickened. The block would contain two parallel lines and a hatch between them. I think I can achieve the lengthening with linear stretch and the thickening I can probably figure out, but I do need help with the rotation! Please see image for desired result: I have tried chained rotation actions, but the lines do not remain the same distance apart. Also, when all objects are rotated about the origin, the top line extrudes horizontally past the bottom (origin) which I do not want. I am not sure how wordy to be with my explanation, so I will leave it at this for now. Let me know if I need to provide anything else!
  21. 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.
  22. 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
  23. 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.
  24. 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
  25. 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.
×