AutoCAD Dynamic Blocks :: Input Labels And Line Length Based On Two Inputs
May 29, 2013
I'm trying to create a pline in a dynamic block where the length is determined by two values I would input into properties or as attributes.
The first value 'A' will be a ground surface elevation
The second value 'B' will be a ground water elevation
I would like to the pline to have a length of A minus B.
I would then also like to have mtext (or any other method of display text) to display the values of A and B.
For example, if I have a ground surface of 102 and a ground water of 91, my line length will be 11, and I can display a label of '102' at the top of the line and '91' at the bottom of the line.
I've created dynamic blocks before, but none that have used an expression of two values or having to display inputted values. I'm not really sure where to start with this, or if it's even possible.
Is it possible to change the length of a line based on the length of an attribute?
I'd like to make the line a MINIMUM length of X" (I haven't decided how long yet--but know I'll need a minimum). But then after the user fills in the attribute, I'd like the length of the line to change to the length of the attribute plus a small amount (again, I haven't decided yet how much extra).
in order to streamline some of my duties i wonder if theres a way to have a dynamic block not only that can change it's length and the dimension for that length (easy) but will also add features to the part. For example can one be made that when stretching its length that once it reaches a certain length automatically split into two sections and keep those 2 sections equal? Also can it be made to contain a tag that keeps track of the lengths as well as number of joints between sections multiplied by a constant?
I was wondering if there is a way with DB's to have a line "follow" or "grow" with the content/value length of an attribute. Maybe some method of linking the attribute width to length of the line? Essentially, it would work just like turning on the underline setting when typing in mtext editor (or any program with an underline option for that matter), expect that the line could be placed anywhere, and would not have to reside directly below the text.
I am creating a block with attributes for a standard job. I have (4) total attributes in this block (for example: panel type, qty, length in imperial, length in mertic)
I would like my length in metric attribute to automatically populate based on the input from length in imperial.
We used a bespoke program to convert our drawings to Java applets for web usage. This does not cope with dynamic blocks at present and we have started to receive drawings from our clients using them.
I need to replace this with standard static blocks based on one of two criteria. Either:
1) Replace based on visibility state (have generic chair block with multiple different chair types set by visibility type, need to replace depending on which type it is set as)
2) Replace based on parameter (have table with size set by dimensions, need to replace with static block for each dimension)
My firm worked on a project recently with a sheet numbering system that created long sheet numbers, ie, MH-101-R1. Since the sheet numbers were so long, they no longer fit in our normal sheet/detail/drawing label blocks. (See attached DWG for an example.)
We are looking to create either a dynamic block or some kind of block that will automatically stretch with the text length.
I design all of the architectural metal used on most project homes being built in Sydney at the moment.
I draw up balustrade and screening etc.
Basically what I have is a huge collection of complex dynamic blocks that I insert into my drawings, I then change all the variables to suit.
These drawings are then dimensioned, and a parts list manually written out based on the lengths etc of each type of material.
All of these drawings are exact reproductions of what is produced on the factory floor, so it is quite easy to identify the parts, but rather painfull to manually write out a cutting list.
I'd like to add attributes and/or fields for material type and length to each of these dynamic blocks, which update as the blocks are manipulated to the required sizes.
where I get stuck is that there are multiple drawing methods used to create these blocks, and I cannot seem to figure out exactly what I should be naming, and assigning length fields too, or even how to extract or what to extract!
When I extract the data, I get a mess of conflicting and confusing information that is impossible to sort correctly, as I can use the dynamic parameter field for some, but not others, and on others it is a simple line, but on others again they are polylines and the length is useless to me.
I have tried to creat a block with an attribute for each and every individual part, but when I combine these into a complex part and try to assign dynamic parameters as a single dynamic block, the previously blocked and named parts wont behave correctly.
Im not sure if im making much sense here, but in my mind it all seems simple enough, I just cant get it to actually work with my exsiting blocks...
All im really after is a simple BOM, for example, I have a dynamic block with the Style code A0-1, when this is inserted I change 3 different lengths depending on the job. This style code is made up of several components such as a 40 mm square post (coded 40SQ), an 80 sq baseplate (coded PF2) and a 50 x 25 mm handrail (coded HR5025).
I need to extract a length for the 40 sq post, a length for the 50 X 25 handrail and an item count for the baseplate.
There may be 25 of these in a drawing, all at different sizes.
The dynamic block works perfectly for drafting, but not so well for data extraction.
There are over 1100 of these dynamic blocks, created over the last 2 years, and the only missing piece in the drafting puzzle is the extracted cut-list to save a large amount of time, and I just cant get it working.
Is there a methodology I need to learn here? will I need to re-create these blocks to allow for extraction?
I have explained to my boss the theory behind all of this and he is keen for some working examples that the monkeys on the shop floor can read and understand, and Im stuck creating an extraction template that can work, even if just for proof of concept that I can refine over the next few months.
I know ACAD can do this, I know my brain has all the data, I'm just not getting the ACAD>BRAIN interface working here.
We are looking for a solution to manage the inventory of a very extensive network with mainly linear assets. Instead of a standard database/inventory solution, we would like to manage the inventory from a plan, from autocad DWG. Meaning that all the objects and relations between objects are defined in the DWG, then uploaded to a relational database and used by various maintenance and operational utilities.
how we would define the relations between objects. For example, how would we say that one object is attached to another object? Can you make a reference from one object to another in the attributes of a block? (but it has to be a strong reference, to an ID).
I am labeling my pipe network structures and I was trying to create a label with a dynamic block. I want to have an octagon with text that I can change. So when I label INLET 1 I will have the information I need plus a symbol that corresponds to it.
Change the 24 x 24 x 12 MLeader in this Block to Fields that read the length of the Lines that the Distance1 and Distance2 Parameters are attached to and tell me if it crashes? And if it does not crash, post a working DynBlk.
-you have a dynamic block with a grip that allows for any adjustable length.
-assume i need a the block to be 500mm long
-i stretch the block 500mm long in CAD (but it is still dynamic and will let me grip the length and adjust).
-after I insert it and set the 500mm length, can I somehow LOCK THE 500 LENGTH, so you cannot grip and edit the length anymore???? (but also have an unlock function for later)
This would be very useful in the following situation: Doing elevation view of a building with wall connections between floors....There would be MANY of these dynamic blocks....But they should all be the same length, per floor...But the next floor may have a different length....So I want to be able to Set Length > then lock in place... (and be able to unlock whichever I want, and adjust appropriately where the connection gets longer/shorter at another location...)
I've update AutoCAD 2012 to AutoCAD 2013 and I have a problem when I type "L" or "C" to draw a line or a circle, the command line says "Unknown command "L". Press F1 for help". It's the same thing if I fully type the command "line" or "Circle". But some other commands works normally.
Working on: Windows 7 Intel Core i7 2.93Ghz 8 Go RAM NVIDIA Quadro FX 3800
is there a way to associate a stretch action with the length of an attribute value (i.e. # of characters in the string) or is this something left to vlisp?
I created a dynamic block with text field that show the lenght of a line, but this line can be 0 and in that case I want that the text field will show nothing instead of "0".
I try to write it in diesel expression with if command but i don't know how to bring the object lenght into the diesel expression code.
I have a problem with Dynamic Input suddenly displaying dimensions in the middle of a line rather than on screen as I work. What I mean is that if I draw a line the length of the line is displayed at the center of the line. When I zoom in to one end of this line the display of the length of the line is no longer displayed on screen but remains at the center of the line. I use AutoCAD 2008.
The attached DynBlk needs to be Constrined. As an LT user I am unable to do so.If you rotate the block thru the range you will notice that the green line changes its relationship to the dark line.I would like for it to remain 5-1/2" from the dark line. (Truth be told I would like for it to stretch to 7-1/4 and 9-1/4 as well but that's another day.)
I try to create a new pipe dynamic block. But I have a problem with my block. In the block, the distance2 I wanna change to some sizes follow the table. And the center line, it changes follow the sizes table, and must be center line when I change pipe size. I can not do it. How to make the block working correctly.
Please see the attached drawing. It's for a conveyor system, and the idea is that when you insert the block, you could then select the size of the conveyor and the angle of the turn (straight sections are another block).
What is suppose to happen is, when you insert the block, you stretch the conveyor to the size desired, and the rest of the block should scale to match. Then you select the angle of "turn", and you're good to go.
I got it all to work except... when you stretch the line out, everything scales, but the line doesn't stay in place and just stretch to the left, it moves, which leaves a gap where the conveyor should be.
The intersection wizard makes dynamic EOP profiles based off of the cross slope from the centerline. Well the intersection tool doesn't always work with funky intersection layouts. Is it possible to manually create a dynamic EOP profile based on the cross slope from the centerline profile?
The problem happens in different blocks created in Autocad 2009. I need to make blocks with many visibilities and, sometimes, only a few lines need to be turned invisible from a visibility state. Many times when I remove the visibility of a line from a single visibility state, the line erased on all the visibility states. I make my lines "all visible" and it's not there anymore.
The problem is probably in my block since it's doing the same problem on someone else's computer. If the problem is my block, is there a way to "uncorrupt" it?
I have a line and would like one line of text above and MTEXT below.
Problem is the annotation scaling part where I can't seem to position the text so it scales to the line correctly.
It's ok at 1:100. I can't work out a way of doing it so that the line is central between the first two lines of text and the three lines have equal spacing.
We have a title block wherein the Location attribute is normally a single line, but occasionally is two or more lines. Within the title block this attribute is surrounded by lines, left, right, top, bottom.
We would like the bottom line to move down when the user adds additional lines to the attribute.
I've made annotative blocks and I've made dynamic blocks... My intent is to integrate both but I can't find a way to move dynamic block parameters separately at different annotative scales.
In other words, if I insert an annotative dimension and add multiple scales I can move the dimension grips independently at each scale. If I insert a dynamic block I want to be able to use the dynamic block's action "grips" to do the same. However, with a dynamic block, if I move a stretch action at one annotation scale it moves the action at all annotation scales.
I have created a dynamic block with several visiblility states. The block works great for what I need it for. however, I am trying to add one more action to the block but am having issues.
This block is essentially a 24" retail cabinet with the visibility states showing the different drawer and shelf configurations. I want to be able to lengthen the cabinet in 24" increments and have the visibility show for each 24" section.....e.g. I want a 10' cabinet so I bring in the 24" starter block. Then stretch the cabinet to the 10' mark, then I can chose any drawer/shelve config for each 24" section (they are all different).
I can get the block to stretch in 24" sections....no problem.....i just want the visibility state to be duplicated as well for each section. Now as it stretches, there is only one Vis state and it only populates the first cabinet.
I could do this by copying the block over and over 5 times.....but I am hoping there is a way to make this dynamic.
I have a block I am making into a Dynamic Block. I will be adding in different visibility states. Depending on the visibility state the block would need to be inserted from a different point.
My question is, is it possible to add multiple insertion points to a dynamic block so depending on the visibility state it defaults to the correct insertion point?
I've been working on this code for a bit now and I've got a Windows Form with a numeric up down box which is designed to determine how many Layouts (PaperSpace) that a user would like generated.
I've got the form to pass the value as to the function as an argument but an not sure how to get the function to automatically generate "x" amount of Layouts based on the value of "int x". Right now i've just got a few "if" statements controlling the system, but i'm looking for a more elegant solution than a sea of "if" statements.
namespace CHPaperSpace { public class PaperSpace { [Autodesk.AutoCAD.Runtime.CommandMethod("CHPAPERSPACE")]
// This will be the function associated with my command public void CHPAPERSPACECOMMAND(int x) [code]........