AutoCAD .NET :: Create A User Parameter For A Dynamic Block
Feb 13, 2012
We have some dnyamic block share set of parameters, if we change a parameter's value, all block that reference this parameter should be change.we can do it by program.
but create user parameters for a dynamic block must be by hand, can we create a user parameter by code? another way is user global parameter. does AutoCAD Parametric function's user value can be share with dynamic block?
I would like to add a new (user) parameter to a dynamic block within my code. I have noticed that this is possible manually. But couldn't find how to do this in .Net. When this parameter has been created it would be necessary to fill in a value. So the parameter can either be a general parameter, that can be adjusted later or a (user/dynamic) parameter specific for the block.
I have a block of a circle and a line coming from the left and right side quadrant of the circle to a common point (see pic). I want to create a dynamic block using a Stretch and Rotate parameter. You select the block, the Rotate point (grip) shows at the end of the two lines. I can grab that grip and rotate both lines and circle by moving this point around the screen, but cannot Stretch this point to a new location at the same time. How can I have the Rotation end point follow the Stretch parameter?
My drawing- block is a little bit complicated, it contains few actions and parameters and everytime i open block editor to add, or to modify some action I can't see my drawing because actions grips and parameters grips obscure my drawing. I tried to refresh layout but it doesn't work.
I am making a simple continuation block (attached) and I am trying to get it to have a rotation parameter along the polyline. I am able to do that, but the only issue is the flip parameter goes all weird when I do so (the text starts distancing itself from the polyline when stretched, rotated and flipped).
Getting into Dynamic Blocks in a big way. As the blocks we use are variants of each other, if the parameters that are created in one block can be copied into another block to save having to re-do the entire parameter sets again.
Macro for writing the sheetmetal Extents width and length to the custom properties. I need to get these values into the part parameters so that they can be used in the BOM.
I can get this to work if I manually create the "SM_Length" user parameter, but how do I make the iLogic CREATE the parameters if they do not already exist? I think it would be something added below the "Catch..." just cant seem to figure out what it needs to be.
'look for custom iproperty and try to set it Try iProperties.Value("Custom", sExtLength)=Round(SheetMetal.FlatExtentsLength, iRoundValue) Parameter("SM_Length")=Round(SheetMetal.FlatExtentsLength,4)
Catch ' assume error means not found and create it customPropertySet.Add(Round(SheetMetal.FlatExtentsLength,iRoundValue), sExtLength) EndTry
I want to use iLogic to create User Parameters with Multi-Value lists filled with info from an excel spreadsheet. What is the code to create a new User Parameter?
i7-2720QM Dell Precision M6600, Win 7 Pro 64-bit, 8GB RAM Autodesk Product Design Suite Ultimate 2013 Autodesk Vault Professional 2013
I have a block that I'm trying to convert for dynamic use.
In the first image, you'll see the items that I want to have rotatable in blue. The items in red should NOT rotate. That part seems to work fine. But the items that do rotate don't behave as expected.
I created the rotate parameter selecting the center of the red circle as the base point. Shouldn't that cause ALL the items to rotate about that center point?
As you'll see from the second image, the blue line rotates about some other point.
EDIT: Well I guess it only does it if I have the blue horizontal line defined with a length constraint. I also need to have that line dynamic--I need to make it longer/shorter.
I've attached a dwg file with the block in it--it's at the top of the block list (___SectMark2).
Wondering if there was a way to have text maintain a rotation angle of 0 while being included in a rotation parameter. I am wanting the "N" for my North Arrow to follow the direction of the symbol of my viewport tag without the "N" character rotation angle changing with it.
I was wondering if there is a way to link one parameter to another. What i'm doing is creating a theater flat block that has adjustable length and width. There are support members that are needed when it gets big enough. Right now i have them set to a Visability parameter and have to select to turn them on and off in model space. Is there a way to link the Visability so that it changes based on the Linear Distance parameter's lenth?
The "Main Stretch" parameter does not correspond with the Block Properties Table. What does this parameter need to be attached to?The paramter will adjust with the pull down options of the Block Properties Table.
Is it possible to make a dynamical block where the attribute is horizontal in combination of the alignment parameter (not rotate)? If I align to an arc the attribute need to stay at an horizontal position.
I have an interior elevation callout block with four arrows, noting the N, S, E, W interior wall elevations. I trick I use to rotate Text while keeping the Text oriented in the upright position is to place a Point Parameter at the center of the text then set the "Chain Actions" to Yes. Then I use the Move Action to tie the text to the Point Parameter. Next step is to use a Rotation Action to select only the Point Parameter, which rotates the Point Parameter and brings the text along with it, keeping the text oriented in the upright reading position always. As an example, think about a viewport tag with a North arrow, and the letter "N" at the arrow tip. When you rotate the arrow, the "N" position rotates with the arrow's point but always is oriented upright.
how (if) I can set up my dynamic blocks so that I can set the parameter values as I insert the block, rather than with the grips afterwards?
To take a simple example; I have a block consisting of a rectangle, with 2 linear stretch parameters - length, width. Can I set it up so that when I insert the block, it asks for the length and breadth,just as it would for attributes.
I'm trying to create a dynamic block that uses a parameter and an attribute definition to determine the diameter of a circle in that block. I plan to export GIS points with diameter in the attribute table into a CAD file with the block definition. I'm having trouble figuring out how to set up the parameters to read to attribute definition and adjust the circle diameter. Using AutoCAD 2013
I have this Dynamic Block which has a few distance parameters on it and an attribute at beginning of each parameter which are attached to a stretch action. If manually bring the block in. And set a value to attribute and then stretch the it , attribute move along with action. But when I do it pragmatically it doesn't . Basically attribute stays at original location of original block before stretch. What is wrong with my code. Or Shall I do something to Attributes when I change the distance parameters in Program? I don't know .
I have a function which bring the block in and set attribute first and then another call which change the distance . So I don't show the first function which to me works fine . The problem is this part.
For Each myBRP As DynamicBlockReferenceProperty In myBRC For I = 1 To NumbderOfDistanceParamsinDynBlk If myBRP.PropertyName = "Distance" & Trim(i.ToString) Then myBRP.Value = DynDistancevalue(i) End If Next Next
I need to create a dynamic block for a "Glass Panel" in a balustrade. I need to be able to insert it, in one corner and stretch it in another corner, to suit the staircase angle.
I've created the block, but it isn't working correctly. I've attached a drawing, with the left hand drawing a sketch of how it needs to be. The right hand drawing is my dynamic block attempt. As can be seen, when the block is stretched between the 2 points, it doesn't follow the angle of the staircase correctly (Very slight run off)
I am looking to create a dynamic block that changes in scale, ex. If I have two (2) viewports in paper space, one 1/4"=1'-0" the other 1/8"=1'-0" I want my blocks to appear to be the same size in paper space.
Also, I would like my blocks to change attributes/features ex. If I have a "light switch block" I would like to have the option of switching the block from a 3-way switch, 4-way switch etc.
I would like to create an "Y" dynamic block, see bellow.
The hole length and the "cross" point will be variable, between the two sticks will be 90 deg, and it will be FIX.
I would like if I change the "variable 2" distance the two sticks follow the cross point, and the top of the sticks stay in the same level, but between the sticks the 90 deg stay!
I would like to create an "Y" dynamic block, see bellow.
The hole length and the "cross" point will be variable, between the two sticks will be 90 deg, and it will be FIX.
I would like if I change the "variable 2" distance the two sticks follow the cross point, and the top of the sticks stay in the same level, but between the sticks the 90 deg stay!
How to create a 'No/Yes' or visibility parameter for a title block? I have my Architectural Seal as an image inserted into my title block family. I want to have that as a parameter for visibility so I can have it turned off until I am ready to print for final building department submission filing.
If possible, this would be a global adjustment so I would operate this parameter once and will affect all the sheets in the project instead of having two title block families and swapping those out at the time of filing.