AutoCAD .NET :: How To Get Block Description Through Blockreference
Dec 28, 2013
my block is a anonymous block with a blockname like "*uxxx", but,but it is not a dynamic block.
how can i get the block description through the blockreference(insert)?
View 1 Replies
ADVERTISEMENT
Nov 29, 2011
How do i add a description to a block that has already been created?
View 5 Replies
View Related
Feb 19, 2009
I have multiple dynamic blocks that I would like to add descriptions to. If I have a block in a tool palette, I can add a description by right clicking and selecting "Properties." But I would like to add a description that shows up in the Design Center as well.
Is there a way to do this without redefining the block? Exploding makes me lose all of my dynamic properties, and I'd hate to have to recreate them.
I'm using LT 2008, by the way, so I don't have ref edit or any of that other cool stuff.
View 9 Replies
View Related
Oct 30, 2012
I am trying to get an "idw" or "dwg" title blocks "DESCRIPTION" property using an Inventor macro.
For example, if the description property on a part (ipt) file is "SIDE PLATE", how can I can the same result if the file extension is a "idw" or a "dwg"?
View 9 Replies
View Related
Oct 3, 2013
I have a dynamic flat screen tv block. Its length flexes to match the lookup table chosen size...32" 42" (the length parameter being a defined mm length) etc i want to display the 32" 42" etc items from the lookup properties table, but i'm at a loss as to how to go about it.
currently i am using an attribute with a field pointing to lookup parameter/object/lookup description string but it's returning hashes.
block.png
View 2 Replies
View Related
Sep 27, 2013
Is there any way to automatically fill in description in iProperties (.idw) from model description?
View 7 Replies
View Related
Oct 21, 2011
we are updating fron LDD 2004 to Civil 3D 2012 needles to say it a huge change. I've got my template almost done I'm just having one problem. With LDD any point that came in with a raw descripitoin not within the description key it would be placed in the current layer with point number, descripton and elevation. How do I make that happen with Civil3D do I have to change my default lable settings? When I import points with a raw description not within my description key it places the point on Layer 0 and only shows the node no point number.
View 2 Replies
View Related
Jan 3, 2013
So i have 3 file DWG :
3.dwg : is a plan 'archi'
2.dwg is a plan with only décoration.
1. dwg is a plan with only the water.
i have this structure in my file (1.dwg) :
1.dwg
---> 2..dwg
---------> 3.dwg (this file is a Xref of 2.dwg)
--> is the blockRefecence (XRef).
Dim CollXref As New ObjectIdCollection Dim mydb As Database = Application.DocumentManager.MdiActiveDocument.Database Dim myTrans As Transaction = mydb.TransactionManager.StartTransaction ' Dim doc As Document = Application.DocumentManager.MdiActiveDocument
[Code] ......
So i don't want to add Id of a Xref From a Xref. (In my example i want only ObjectId of the 2.dwg not 3.dwg if i launch this code on 1.dwg.
View 3 Replies
View Related
Mar 8, 2013
Do we have any way to sum attribute value (integer) of many blocks fast?
View 8 Replies
View Related
Jun 26, 2012
I am working on simple WorldDraw overrule where lines and polylines are displayed with little cross. Size of cross is related to view size.
Everything works fine except blocks and Xrefs. If they are scaled then crosses are scaled as well.
I know how to get entity owner ID but it refers to BlockTableRecord only not to BlockReference.
View 3 Replies
View Related
Dec 11, 2012
I have a group of classes that essentially implement the Model View Controller pattern. The view is a custom control contained in a PaletteSet. The Model is a class that wraps the ObjectID of a given block. I've used these classes to create a replacement for the Properties tool in AutoCAD (2011). Basically the UI can be used to edit the properties of a Dynamic Block. But I apply my own rules and behaviors to the UI.
I had no problems until I added support for the View to be updated when the block is modified (say by dragging to increase a length property). To do this I handle the Modified event of the block. After the block is modified, some rules are evaluated. If the rules result in changes to the block's properties, these changes are applied. This last part is where I'm having trouble.
When the "Rule Evaluation" code is invoked because of changes to the view (WinForms Controls), I am able to update the block's Properties using the following code without issue:
Public Shared Function SetParameter(ByVal BlockID As ObjectId, ByVal ParameterName As String, ByVal Value As Double) As Boolean
Using dl As DocumentLock = Application.DocumentManager.MdiActiveDocument.LockDocument(DocumentLockMode.ProtectedAutoWrite, Nothing, Nothing, True)
Using myTrans As Transaction = BlockID.Database.TransactionManager.StartTransaction
Dim myBRef As BlockReference = BlockID.GetObject(OpenMode.ForWrite)
For Each myDynamProp As DynamicBlockReferenceProperty In myBRef.DynamicBlockReferencePropertyCollection
If myDynamProp.PropertyName.Equals(ParameterName, StringComparison.OrdinalIgnoreCase) Then
myDynamProp.Value = Value
myTrans.Commit()
Return True
End If
Next
Return False
End Using
End Using
End Function
However, when this same code is invoked as a result of the BlockReference Modified event, AutoCAD completely crashes the momment the transaction.Commit() method is called. I've attempted to catch the exception causing the crash and role back the transaction, but AutoCAD simply exits and displays the error (Error handler re-entered. Exiting now.) and no exception is caught. Note that I do not use the BlockReference instance passed to the Modified event handler. Instead I store an ObjectID instance elsewhere which is consistently used to read/write the block.
Is there something I must do before commiting a transaction when using the Modified event of BlockReference? I checked, and the same "Main Thread" is executing whether the code is invoked from a UI event or the Modified event. I tried calling the Close method, which is attributed as Obsolete, on the BlockReference object before executing the transaction without any success.
View 3 Replies
View Related
Apr 24, 2011
I need to insert Blocks with Attributes and its values from another drawing into the active drawing. I am not sure if the way I am doing it is correct. I am having problems with the transactions, one for the source drawing and the other for the active drawing. I had a few eviolations problems. It seems that I have to close the transaction of the source drawing before I can access the active drawing and the other way around.
Since it is a BlockReference with AttributeReferences and its values I firstt opened the source drawing on a side database withing its own transaction and went through the ModelSpace TableRecord until finding the BlockReference with the correct AttributeReference value. Then, I had to store all the Tags and TextStrings on an array because I could not access the active drawing without closing the source drawing transaction.
If the BlockDefinition exists on the active drawing then I only have to create a new BlockReference with the AttributeReferences and update its TextStrings with the values stored on the array. All of this withing the active drawing transaction.
If the BlockDefinition does not exist on the active drawing I could insert it from the source drawing side database ONLY within the active drawing transaction. I have to close the source drawing transaction first.
Now, is there any way of doing this that won't require switching transactions? Is it possible to find the BlockRefence on the source drawing from the active drawing transaction?
View 3 Replies
View Related
Aug 5, 2013
I have rotated my view about 15 degress (just for this example).Now I prompt user to select the point, which is also an insertion point of the block.
So we have:
- selected point: X=0, Y=294, Z=0;
- insertion point of the block: X=0, Y=294, Z=0
(this is what I have in properties list or when I execute LIST command).
Now in my
ed.WriteMessage("
Base X: " + basePoint.X.ToString()); ed.WriteMessage("
Base Y: " + basePoint.Y.ToString()); ed.WriteMessage("
Block X: " + blkRef.Position.X.ToString()); ed.WriteMessage("
Block Y: " + blkRef.Position.Y.ToString());
This gives me:
Base X: -2.89976376244283E-14 - OK
Base Y: 294.058394637539 - OK
Block X: -76.1079129044681 - BAD
Block Y: 284.038597817502 - BAD
My question - why blockReference position is different that it should be?
View 2 Replies
View Related
May 1, 2012
My primary goal in this exercise is to select a nested polyline within a block and have access to its grips. I'm still not even sure if it's possible.
However, before I'm even getting to that stage I'm hitting some problems. I have some custom objects which all in some way or another inherit from BlockReference:
BlockReference
-Derived Abstract Class with common attributes
-Derived Concrete Class1
-Derived Concrete Class2
-Derived Concrete Class3
I insert instances of my derived concrete classes using jigs( Class2 for example is created using a polyline jig). However, when I select the block generated from it using a PromptSelectionResult, it returns a BlockReference, not the derived concrete class, not the derived abstract class.
When I try and cast that as the correct class type I get an error telling me I can't cast from the Base class to any of the derived classes.
So, firstly, why is it returning a BlockReference when the object I'm clicking on is an instance of a type that indirectly inherits BlockReference? And is it even possible to gain access to a nested entity's grips? I followed post here: [URL] .... but it doesn't give me what I need.
I've tried ed.GetNestedEntity and the AllowSubSelections property of PromptSelectionOptions and had little joy.
View 3 Replies
View Related
Apr 24, 2012
Is there a way to add descriptions to DS project folders after the fact?
View 9 Replies
View Related
Oct 30, 2013
I want to implement the following Key SAN10L....I have tried many codes to accomplish this: SAN*L, SAN##L, SAN?L. The 10 in the code represents a number from 1-99. The "L" is alphabetic. I want to use the survey database to create linework. I have everything setup, but cant get the code to work to generate the linework.
View 4 Replies
View Related
Jun 19, 2013
I'm trying to make a description key set for our surveyors and am running into a problem with one description. For an iron rod they will use the description CH*IR 3/8 W/CAP. I cannot get the point to come in using the right point and label styles.
View 5 Replies
View Related
Mar 31, 2011
I know the default Description Key Sets can be set in the Properties. If I set the order in our template drawing this does not seem to hold when a new drawing is started with the template. How can I set the default description key for when a new dwg is created from the template?
View 8 Replies
View Related
May 5, 2012
For some reason in my base template for field work the "Disable Description Keys" option in Points Creation is set to "true"
How can make this default to "False" in my template. I've tried changing it and then saving the template again but it reverts to true all of the time. I have to select my points and do apply desc keys whenever I import points.
View 2 Replies
View Related
Oct 18, 2013
I am sure this is extremely simple to do but I am missing something. I am wanting to set the Description of a part in the Iproperties using values from the parameters. For instance, if the part has a length value of 10 and a width value of 5 I want the Description to say: 10 x 5 Floor Sheet
I cannot figure out how to extract the parameter values and place them into the iproperties. Here is what I have tried: iProperties.Value("Project", "Description")=" =<Length> x <Width> Floor Sheet"... This gives me the following result in my description: x Floor Sheet
View 4 Replies
View Related
Jan 10, 2013
Civil 3D Newbie here.
I am making a directory full of the blocks we will use for the description key file to use. My understanding is that all of these blocks (manholes, hydrants, trees...etc) should be on layer "0" and of standard size. Manholes should be about 3' in diameter, transformer pads around 4' square....etc. Essentially, 1 = 1 true scale.
Is this true?
View 1 Replies
View Related
Jul 18, 2013
I currently use Leica Viva Smartworks for surveying and it captures the linework codes in its own field, so when I export my CSV file my Descrition comes on with the feature code but the linework code is another field. Is their a way that using the Format field in the description Key that I can get the Full description field to read something like "V-DOMW-PIPE B", which would pull the feature code from the raw descrition field and the begin line code from the Linework field.
View 5 Replies
View Related
Feb 21, 2012
Is there a way to change a RAW description such as EC12 +, or EC11 -, to say SWP12 +, SWP11 -
I'm not having much luck using the parameter settings. 1$
I tried Code = EC*, format=SWP1$
That didn't work... I got literally SWP1$ instead of SWP12 +
Is it a space thing? Do I have to rename all the descriptions to have a space before the parameter?
i.e. EC 12 +
I'm hoping this isn't the case and some form of wildcard can be use.
View 4 Replies
View Related
Oct 10, 2012
I have to draft a lot of existing lots and easements from legal descriptions and recorded map documents. Does Civil 3D have an option to enter metes and bounds (bearing and distances into a table format and then "autodraft" from the entries in that table?
View 7 Replies
View Related
Sep 21, 2011
I would like my parameters to show in Description tab in BOM. Although I marked the for export I only see them in iprop.
How can use them in the create expression in BOM and add them to the part list later.Right now I dontsee them if I want to creat an expressin in the BOM
View 6 Replies
View Related
Mar 13, 2008
Is there a way to exclude points from a point group that have no description?
View 4 Replies
View Related
Jun 19, 2012
get the list of all the MAPs commands with description.
View 5 Replies
View Related
Jun 13, 2012
Creating a format to keep a number following a code.
My code is BCCD#
My format is DFL CC $+
My result now is:
Raw Desc. BCCD1 B (Bottom of Concrete Ditch)
Full Desc. DFL B CC (Ditch Flow Line and Type)
I am attempting to create a key that will create the following full description from the raw description:
Raw Desc. BCCD1 B (Bottom of Concrete Ditch)
Full Desc. DFL1 CC B (Ditch Flow Line and Type)
The reason that I need to change the description is to comply with certain standard codes from an outside entity but I do not wish to change the filed coding that we use in house. I cannot seem to find a parameter that would allow me to keep the number behind the DFL descriptor
View 3 Replies
View Related
Dec 6, 2011
I have a custom iPart for a rectangular flat bar that's 100x10mm. The length is the custom field.
I would like the description in the BOM to append the length, e.g. 100x10 Flat bar-235mm. (This is so that I don't have to create a length column in the BOM just for this item).
I have tried 100x10 Flat bar - <length> but this gives an error.
View 8 Replies
View Related
Nov 28, 2012
In LDDT 2009, I was able to describe points like this: STK #32
But in Civil 3D 2013, whenever I use the # symbol, the description gets truncated. So, using the point description above, it will show up in Civil 3D 2013 as STK rather than STK #32.
Is this a setting or something that I can switch on so that the I can use symbols such as # and - in my point description?
View 6 Replies
View Related
Apr 18, 2011
We use a lot of Null Structures but then give them different descriptions. More often than not when I give them a description and then get out of the drawing, the next time I get back in it says "Null Structure" again. How can I keep the description the way I want it?
I know that "the right way" would be to have specific structures made for each of these items, but that doesn't seem to be a priority at my company..
View 9 Replies
View Related