AutoCAD Dynamic Blocks :: Diesel Expression That Read Object Length

Jan 10, 2014

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.

View 4 Replies


ADVERTISEMENT

AutoCAD Visual LISP / AutoLISP :: Diesel Expression For Attribute And Dynamic Block

Mar 15, 2013

I have a task where I need to automatically insert the drawing number (no path), plus two additional items, one an attribute, the other is within a dynamic block. I can achieve this using fields but now I havce to truncate some of the text.

It seems like I can't edit if I am using fields and attributes/blocks can't be used in Diesel (correct me if I'm wrong)

This is the information I have:

Filename: 123456-AS-WE.dwg
Attribute: Q2
Dynamic Block: X1 - Additional Information

This is what I require: 123456-AS-WE [Q2] [X1]

This is what I have so far: 123456-AS-WE [Q2] [X1 - Additional Information]

In other words, I need to restrict the dynamic block field to the first two characters.

View 6 Replies View Related

AutoCAD Dynamic Blocks :: Length Of Object Field

Sep 30, 2013

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.

View 3 Replies View Related

AutoCAD Dynamic Blocks :: Change Length Of Line Based On Length Of Attribute

Jan 8, 2013

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

View 3 Replies View Related

AutoCAD Dynamic Blocks :: Line Length Follow Content Length Of Attribute

Mar 16, 2012

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.

View 5 Replies View Related

AutoCAD Dynamic Blocks :: Dependent Expression Cannot Be Evaluated

Nov 11, 2011

Using expressions/formulas in a dynamic block. I want to create a dynamic flat truss with webbing, where you can select the number of V webbs and as your stretch the length of the truss the vees stretch accordingly. With the array parameter, you seem to be limited to predefining a spacing and the number of instences increases as you stretch the object. I want to set the number of instences and let the spacing change. In particular I have tried using the Parameters Manager to create a user parameter that takes the lenght of the truss and divides it by a number. When I try this AutoCAD gives me "A dependent expression cannot be evaluated" It appears that all of the Action Parameters cannot be used in expressions which really limits things.

View 1 Replies View Related

AutoCAD LT :: Using Field Expression In Diesel Macro

Nov 13, 2013

Is it possible to get the value of a (custom)field expression in a LT diesel macro?

E.g. I would like to read the value of the following field: %<AcVar CustomDP.Current Revision f "%tc1">% 

I need this information so I can use it in a file name.

View 5 Replies View Related

AutoCad :: DIESEL Expression - XREF Path ONLY

Aug 24, 2011

Is there a way of showing only the location of the xrefs using a diesel expression (or otherwise)?

At the moment I'm using $(xrefs,5), but all the xrefs are in the same folder, and I only want that folder path shown once.

I.e., even if I have 5 xrefs, I just want one line showing the folder path of those xrefs.

View 5 Replies View Related

AutoCAD Civil 3D :: Diesel Expression That Reads The Layout Tab?

Jun 4, 2013

have a diesel expression that would read a layout tab? for example if i have a layout tab names 244180101 I would need it to read the last 2 digits in the layout tab.

AutoCAD Civil 3D 2014
HP Z620 Workstation 64-bit
Duel Intel Xeon E5-2620 @ 2.00 GHz
Ram: 48 GB

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Diesel Expression To Get Attribute Value?

Jan 12, 2012

I have a multileader balloon that I want to have a field that is a diesel expression that will allow me to select a block and extract the attribute value within that block. Is there anyway to do this?

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Adding / Subtracting In Diesel Expression

Nov 14, 2013

I have been asked to make the title text larger (drawing are being issued at 1/2 scale, A1 to A3) on a large set of drawings. My solution was to copy the title attribute block to a temporary location, resize the attributes and redefine the block by running a script (scriptpro). Some drawings needed the title line split to next line so I had to move the sheet counter (1 of xx, 2 of xx etc.) which was linked to drawing file name for number with a field/formula.

The diesel expression shown below extracts that number. My problem is I cant figure out how to I can edit this expression to allow for a set not starting at 1. I had used a formula to subtract the difference,but how do you express this to run in a script?

This is my script......

attreq
0
-insert
ftc-gwp-a1-nosheet-stb=ftc-gwp-a1-nosheet-stb
0,0
1
1
0
[code]........

View 7 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Edit Diesel Expression In Field

Sep 2, 2011

If LISP can be used to edit a diesel expression in a field inserted in dtext?  I need to adjust the last number in $(+, $(GETVAR, USERI2),1) .

View 4 Replies View Related

AutoCad :: Dynamic Blocks - LOCKING Variable Length?

Jan 4, 2012

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

View 8 Replies View Related

AutoCAD Dynamic Blocks :: Associate Stretch Action With Length Of Attribute Value

Jun 23, 2011

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?

View 1 Replies View Related

AutoCad :: Can Dynamic Blocks Be Made To Add Or Delete Parts Based On Length

Jan 4, 2012

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?

View 1 Replies View Related

AutoCAD Dynamic Blocks :: How To Keep An Object Centered On A Dynamic Block

May 29, 2013

I am creating a dynamic block of a conveyor belt it has a set number of widths and needs to be stretchable in length, which I have managed to do. The motor is placed half way down the length of the conveyor and needs to stay centered

I know I need to use the move command and put in a factor of 0.5 somewhere, but I can't remember how to do it.

View 6 Replies View Related

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.

View 7 Replies View Related

AutoCAD Dynamic Blocks :: Slotted Hole - Specify And Vary Width And Length Independently

Jan 11, 2013

I'm trying to create a dynamic block for a slotted hole, where I can specify and vary the width and length independatly.

To add complications, I also want the centrelines to stretch accordingly.

I've made some progress, it's 75% there, however certain combinations seem to 'break' the block.

ACad, MEP, 3DS Max
Windows 7x64
X5482 @3.2Ghz 8Gb Ram
Quadro FX1700

View 6 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Diesel Expression - Display Area In Square Feet Not Square Inches?

Feb 16, 2010

How I can update my diesel expression to display the area in square feet not square inches. See expression below.

^C^Cattdia;0;_-insert;AREABLK;1;1;0;$M=$(getvar,AREA);attdia;1

View 9 Replies View Related

AutoCAD .NET :: Object ID Of Dynamic Blocks

Aug 1, 2013

I'm trying to loop through blocks in paperspace for a specific name and then edit it's attributes. The code works fine if the block is a standard block, but does not see dynamic blocks.

I have looked through other posts and can see how there is a is dynamic property, but just don't know how to apply it here. The function i have to update the attributes expects the object id of the block. Just don't know how to get that if the block is dynamic.

Dim TbloOjbectID As ObjectIdDim mydb As New Database(False, True)mydb.ReadDwgFile(Newfname, FileOpenMode.OpenForReadAndWriteNoShare, True, "")Using Trans As Transaction = mydb.TransactionManager.StartTransaction() Dim myblocktable As BlockTable = mydb.BlockTableId.GetObject(OpenMode.ForRead) Dim mypaperspace As BlockTableRecord = myblocktable(BlockTableRecord.PaperSpace).GetObject(OpenMode.ForRead) For Each myBTR As ObjectId In mypaperspace If myBTR.ObjectClass.DxfName = "INSERT" Then Dim myBref As BlockReference = myBTR.GetObject(OpenMode.ForRead) If UCase(Left(myBref.Name, 4)) = "TBLO" Then TbloOjbectID = myBref.ObjectId If DwgTitle.Length > 0 Then SetAttribute(TbloOjbectID, "PROJECT/CONTRACT_NAME", DwgTitle) End If End If End If Next Trans.Commit() End Using 

View 3 Replies View Related

AutoCAD 2013 :: Dynamic Blocks With Wipeout Object

May 12, 2013

Is it posiible to give the constrain for wipeout object in Dynamic Block.

View 3 Replies View Related

AutoCAD Dynamic Blocks :: Stretch Action With 3D Object

May 9, 2013

I would like to stretch my extruded shelf using a list of value settings.

I completed the steps in block edit but it will only allow my object to move to my value sets.

In 2D I have no issue.

What am I missing when modifying 3D objects.

See attached blocks.

View 9 Replies View Related

AutoCAD Dynamic Blocks :: Object Automatically Rotated To UCS?

May 23, 2007

I have an arrow in my Dynamic Block which I can rotate to the north. But is there a commando that the arrow will rotate itself to the UCS? See drawing file.

View 4 Replies View Related

AutoCAD Dynamic Blocks :: Control Size Of Object Through Parametric Dimensions

Jun 28, 2012

How to set up a dynamic block so I can control the size of an object through parametric dimensions that are linked (somehow) to a lookup table, spreadsheet, list, etc.?

What I'm trying to do (simplified) is place a block of a rectangle, select a size from a dropdown list, and have the block change to be that size - but I don't want to do this through visibility states as there are hundreds of sizes. The whole point is to be able to construct a list, lookup table, excel sheet, etc and link it to parametric dimensions in the block, or at least be able to link a stretch action to parametric dimensions. But the block editor will not allow me to associate a stretch action with a parametric dimension (at least I haven't figured out how to do this.)

View 1 Replies View Related

AutoCAD Dynamic Blocks :: Create With Stretch Action Include Wipeout Object

Aug 2, 2012

I consider following problem: is it possible to create dynamic block with strech action include wipeout object (frames are turned off).

View 9 Replies View Related

AutoCAD Dynamic Blocks :: Annotative Parameters Inside Dynamic Blocks

May 5, 2010

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.

The attached file shows a simple example.

View 2 Replies View Related

AutoCAD Dynamic Blocks :: Adding One Action To Dynamic Blocks

Mar 15, 2012

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.

View 7 Replies View Related

AutoCAD Dynamic Blocks :: Insertion Point On Dynamic Blocks

Apr 23, 2013

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?

View 2 Replies View Related

AutoCAD Dynamic Blocks :: Rotate Text And Object Without Rotating Text

Aug 29, 2011

I know this is located in other locations but I can't seem to make it work with my block.

I would like the cross and the text N to rotate independantly of the arrow while the N stays with the thick line.  That's the easy part.  How can I make the N move along the rotation path and keep the text aligned horizontally?  I read something about linked action and move, but I can't make it work. 

View 9 Replies View Related

AutoCAD Dynamic Blocks :: Stretching Dynamic Blocks

Sep 7, 2012

is there a way to make dynamic blocks stretchable similar to a mleader,

the blocks i create are only stretchable by grips, and not by crossing

(i am using linear or point parameter stretches)

View 2 Replies View Related

AutoCAD Dynamic Blocks :: Grips And Dynamic Blocks

Jun 1, 2006

Is there anyway to link standard AutoCAD Grips and there commands to Dynamic Block Actions? I want to stretch an arc by its midpoint grip. This accomplishes something that no other commands do.

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved