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

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

Found 101 results

  1. Hi all, I'm not new to AutoCAD but I've honestly never created a dynamic block and don't know what I need to do. I've watched a few tutorials on dynamic blocks but what I am trying to do seems a little different than the typical use-case. I do a lot of audio-visual one-line drawings in AutoCAD. I have device equipment blocks showing all input and output connectors. I manually make them for every device but am looking to have a go-to generic dynamic block for one-off simple devices. Here are examples of finished manually created blocks: However, what I am looking for is a block that dynamically transform from this: To this: Ideally, block parameters would define how many "lines" of connections there is. Or, I am guessing there is a way for the block to be stretched such that the lines of connections become visible, but I do not want free stretch. The bottom edge of the rectangle should be a specific spacing from the middle of the last line of text. I'm sure the text could be shown or hidden with visibility, but then I don't understand how I'd resize the rectangle as required. Attributes can allow text for NAME and CONN for each IN/OUT. The manufacturer, model, and DEV_ID are all attributes. If for example there are a different number of inputs/outputs, I imagine just leaving the text attributes blank is enough to effectively hide them. If there's videos on doing this sort of dynamic block, links are appreciated. Most of the videos I've found are discussing layout/graphic objects. Thanks!
  2. Hi all! I came out with a problem in the last days, which I wasn't able to solve at all. It's about the creation of a dynamic block of a door, which features stretch, move, polar stretch and rotate commands. I reviewed, with great benefit, already several blogs, but this problem has a different issue which I hadn't found discussed yet. The main problem I am experiencing is how to keep the door tag horizontally, while rotating the door (problem which I solved), meanwhile (the Tag) it must stay fixed in the middle of the opening, even when I am scaling the door (problem which I haven't solved). I am attaching three blocks: 1) DOORTAG_0 is the main file I created with all the features I would like to keep for the door (it lacks, basically only of the possibility to be rotated) 2) DOORTAG_1 is a first attempt about how to solve the problem (it is possible to rotate the door keeping the text horizontally but impossible to keep it in the centre when scaling) 3) DOORTAG_2 a second attempt which I solved with polar stretch. However this structure of commands doesn't allow me to properly scale the door. If someone could check this issue, or have a look at my file, it would be so much appreciated, and surely of great help. Thousands thanks in advance, Andrea. DOORTAG_0.dwg DOORTAG_1.dwg DOORTAG_2.dwg
  3. I'm trying to figure out how to accomplish this. I *think* I'm able to do it via block properties - but I'd rather not use a block properties table if I can avoid it. If only because there's a limit of 1 block properties table per block and I want to save that for other purposes. Attached is a sample block. It's just a square with a notch in one side, filled with a hatch. Using the lookup table, and the defined stretch actions, I can grow the block to any of the desired 4 sizes. But I want more. I want grips that will let me re-size the block by dragging - but it needs to retain the proportions. If I drag in the Y axis, the X-axis doesn't update. If I pull the left side, the right side doesn't update (and neither does the Y axis). I've tried various combinations of stretch, scale, and constraints - so far I've come up empty. StretchSample.dwg
  4. I am attempting to create a Dynamic Block for electrical home runs that behaves similarly to home runs 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. HOME-RUN.dwg
  5. All Steel Shapes with different environment now in one block. Shapes>>> Beam,Channel, Tee, Equal/Un-Equal Angle Environment>>>American, European, British, Japanese Download Block: https://jentertain.blogspot.com/2019/12/dynamic-block-of-steel-shapes-metric.html
  6. I have shared a Dynamic Block and you can download through the link below and also can watch video that demonstrate it how to use 2D dynamic block to develop a flat pattern of a cylinder that has been oblique Section. Dynamic Block Download Link
  7. Dynamic Block Pressure Vessel Dish head 2:1 Elliptical head Dish Head All Types.dwg
  8. Dynamic Block of ASME B16.5 Flanges Rating 150# 300# 400# 600# 900# 1500# 2500# Sizes From 1/2" to 24" Watch The video of Dynamic Block Block https://www.youtube.com/watch?v=sdFtOPWggFo ASME B16.5 Flange Plan.dwg
  9. Hi, I need your help on creating a dynamic block of a steel roof. Here is the basic element of the steel roof which I need to repeat, the hidden line being the beginning and ending of the steel sheet. I have tried the array action without success. My only solution is to use xclip on an imaginary large steel roof but doing it with a dynamic block will be just great. Thanks. Steel Roof Dynamic Block.dwg
  10. I have a dynamic block for section cuts and I need the interior line to adapt stretch to to be trimed by the contour when I turn it. this is the block when I select it for the time being. My current work around is that I have the line constrained with a stretch that I manually need to bring to the edge. I also have a visibility state so I can pass from section with page or same page is there a way to place the same attribute (Not two as I currently have) in two location depending on the state? Is there someone who knows how to make this work? with just the flip and the turn. I also have a visibility state so I can pass from section with page or same page is there a way to place the same attribute in two location depending on the state? thanks
  11. Hi, I´m trying to make a dynamic "AND/OR" block for some logic diagrams. I want the block to be dynamic in two ways: 1. Number of inputs 2. Each individual input should have the option: inverted (circle) or not inverted (straight line). I can´t manage to get this to work and as far as I have googled it might even be impossible... but maybe someone here have a clever mind to make this work. BR, ripuz
  12. 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
  13. See screenshots. How do I place the lookup in an ordered manner? Thanks in advance.
  14. 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
  15. 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
  16. 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
  17. 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
  18. 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 ...
  19. 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
  20. 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
  21. 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.
  22. 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
  23. 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...
  24. 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) )
×
×
  • Create New...