I have created a generic title block for all my drawings and I have some attributes for the block. Is it possible to have a drop down list for an attribute so I do not have to type in the value/text each time? If so, how?
I want to be able click on 'customer 1' or customer 2' ect. and not have to type it in the attribute.
Is there anyway to move attributes up or down on the list of a title block? I like everything for Rev 1 to be together (Drawn By, Checked By, Approved By, Date, Description, and Rev Number)...However, i was in a hurry and skipped Approved By. Once i added it, after the entire title block was done, it moved it to the very bottom on the list. Is there a way to "Move Up" so that it's with the other Rev 1 group?
when I insert a block with attributes I get the prompts on the commandline to fill in the attributes. Can I stop this from happeneing, and just insert the block?
Alternatively, can I get the Attribute Editor dialogue box to come up instead?
Sidenote: How hard is it for people to learn that blocks need to be INSERTED not copied - if you copy the blasted thing the attributes are messed up, why is that so HARD?
I'm looking for a lisp routine that will globally list all the values from a specific attribute tag within a specific block. The attribute tag is "COMMENT" and the block name is "FSD".
select all blocks on certain layers in a drawing, check attribute CIRCUIT in each block if it starts with MS then attribute CONTROL = switched. I hope thats clear enough the way
(defun c:control() (graphscr) (Setq sc (ssget "X" '((0 . "INSERT")
What I really want to do is on our fire alarm blocks we have 3 different attributes one for the address, the candela and one for misc info. I want to make an attribute that takes the number from the candela (15,30,75or 110) and change a different attribute to a value depending on which candela we use (such as 15=.078, 30=.113, 75=.195 or 110=.259). But I don't want the .078,.113,.195,.259 to print out on paper, I want to export block information excel file so I can add up all values.
Is it possible, via whatever methods (lisp?) to be able to have a premade block with an attribute and insert it into a drawing then assign a value to it by selecting another existing block in the drawing and using one of its own attribute’s values?
For example, say I have a block representing a telephone and it had an attribute called "PhoneNo" and I inserted it into a drawing showing an office floor plan that had blocks in each office space that are telephone junction boxes with attributes "PhoneExtension". I would like to be able to autocomplete the entering of the “PhoneNo” data by selecting one of the telephone junction boxes in the drawing and using its attribute’s value.
I have an existing title block a few text attributes, to which I wish to add a watermark. I have added it in the block editor as a normal attribute, with the same details as the other attributes that work, only a different tag name. It has a default value, "DRAFT" and is tagged "WMARK". It works fine in the Block Editor, and If I test the block I can edit it to display whatever I want, but if I save the block and open it from Autocad proper, the attribute is not in existence, either as a default value, or editable from block properties, attribute editor or title block editor, whereas all of the other attributes are there. I have used BattMan to verify the settings of the attribute, and the only difference is that the others all have "L" in the "Modes" column, but I think that means that their position is "locked" whereas my new attribute is justified "aligned" therefore cannot be "locked" (This is some assumption on my part, as the documentation on the "Modes" column is almost non-existent). I cannot afford to waste much more time on this issue, as the boss is breathing down my neck, but editing watermarks on every drawing after every revision is frustrating, when it could be an attribute that is editable from the title block editor.
I need to match few attribute values from one block to different block. I download a lisp file called; ca.lsp which can match the single attribute value. I modified it for more than one attribute value matching. It is ok but still wish to overcome two issues for batch prcess
1. picking up the blocks by selection
2. click the alternative block numbers of times to match the numbers of attribute values I needed.
How to modify this lisp I can run it by block name selections instead of picking selection which enable me to run batch process for numbers of drawing? That will be good...
Lisp & Demo file attached (Match attribute value, A, B & C to Attribute 1, 2 & 3).
Is there a way that I can create a block with text ('A') and when I insert the block and populate the block another block block will update also? I am wanting to create a block for x-sec flags, and detail callouts that update their detail titles.
Drawing 1 : Contains tree blocks that have a specific scale dependant on the tree size
Drawing 2 : Contains a block with just a point and attribute data about the tree (name, size etc.)
This block is approximatly at the same location as the tree block (0,1 m precision)
Problem I want to join these two items together. In other words, in the tree block that is scaled correctly i want the attribute data with the name, size etc. These blocks don't have a corresponding unique number or something like that.
In the blockeditor I can change the draworder so the attribute is partly under some lines. But the draworder in the blockeditor of the attribute doesn't work in the normal modelspace; the blockattribute is allways on top.
I am learning autolips and i found a problem that i can´t solved.
(vl-load-com)(defun c:pmb ( / ss ent pt )(prompt " selec block : ")(setq ss (ssget '((0 . "INSERT")))) (setq ent (ssname ss 0)), (setq pt (cdr (assoc 10 (entget ent)))) (command "point" pt)) wich this code you select one block and insert one point at insert point´s block.
which this other code yo select all block and insert all point.... but in one block
I am using Autocad 2007 I made several blocks with att. And I use this drawing and copy it to the samples/design center folder so that I can see the blocks that I created on the Design center window for use on different other drawings.
My problem is that if I make a cange on the ORIGINAL block drawing how can I update the inserted blocks on the other drawings? I try to delete the block from the local drawing insert block list (is this possible?) to paste the block again with the new changes, but somehow even when I grab the new modified block to inserted again when I do it, it takes the shape of the old version!
Is there somone who can explain/show a sample of how a custom drop-down list in OPM can be implemented? Based on some articels by Kean Walmsley, I have successfully implemented categorized properties in the OPM using a .NET wrapper and C#. I have a class imlementing the members of the IDynamic EnumProperty, ICategorizeProperties and IDynamicProperty2 interfaces (based on ObjectARX 2013).
However, I do not really understand how to code custom drop-down list using .NET wrapper and OPM. I am using AutoCAD 2013 and 2014. I have read a lot of posts regarding OPM but there was no useful information in regards to create custom drop-down lists.
I am mainly developing for AutoCAD 2013/2014 how to implement a custom property as a drop-down list using OPM and .NET/C# wrapper. I have successfully created categorized custom properties already and can read/save them in XRecords via the OPM. I further implemented the members for IDynamicEnumProperty (using an ObjectARX DLL) in .NET/C# which are:
And I have implemented the GetCurrentValueData() and SetCurrentValueData() members in my .NET/C# wrapper as per the IDynamicProperty2 interface as following:
public void GetCurrentValueData( Object pUnk, ref Object varData ) {AcadObject obj = pUnk as AcadObject; if ( obj != null ){using ( Active .Document.LockDocument( DocumentLockMode.ProtectedAutoWrite, null, null, true ) ){using ( var tr = Active.Transaction ){ObjectId ObjId = new ObjectId( (IntPtr) obj.ObjectID ); DBObject DbObj = tr.GetObject( ObjId, OpenMode.ForRead ); if ( DbObj != null ){try {if ( [code]....
This code compiles without error but instead of the expected drop-down list the OPM only shows a field where I can enter or edit integer numbers, but there is no drop-down list when clicking on the field....
I am fishing around for information that will abstract my macro one more level. I coded an excel macro to run the following statement on a given set of drawings:
Yielding text files which I consolidate into Excel to generate a full attribute extraction of the drawing set. My question concerns the extraction template file used in the ATTEXT command (shown as ExtTemplate in the code above). As it stands now, the Excel user must provide the attribute tags they want to extract and then I generate the proper extraction template in the background. My goal would be to eliminate this step from the user side and simply extract all attributes in the drawing instead of a designated few.
If you know a better way to do this using the ATTEXT command or a way to do this without the ATTEXT command at all, I would be grateful to hear it. From my current perspective however, I believe I would need to query the drawing to get a list of all attribute tags it contains, then configure the extraction template to use all the tags from that query. I cannot figure out a way to generate this list of tags. So, that is my question
I have been making a title box for my drawing layout and have been using attributes. all my attributes open in the 'Enhanced Attributes Editor'. But for my Scale option, i was wondering if there was any way of creating a drop down list in the enhanced attributes editor instead of typing the value in each time?
How to choose the attribute or field data from a list?
When using the “title block”, attributes and fields to better control the information that belongs to the drawing, then it worth to have a feature that allows selecting this information from a LIST.
For example, if we need to specify “location” of the project, then it is better to have sort of list from which we can select the location of the project the same we do it in the Excel (as shown in the screenshot below).
Is there such feature in the AutoCAD? To choose the information from a list?
I need to open a drawing and read the block attributes and find a block with name "ABC" and attribute named "Text" in "ABC" block. for which i am using the below code which is working perfectly.
Try AcadApp = GetObject(, "AutoCAD.Application") Catch ex As Exception AcadApp = CreateObject("AutoCAD.Application") End Try AcadApp.Visible = True Try AcadDoc = AcadApp.Documents.Open(DWGName, True) RichTextBox1.AppendText(" - Opened File Successfully" & vbCrLf) Me.Refresh() Catch ex As Exception RichTextBox1.AppendText(" - Can not Open this Drawing" & vbCrLf) Me.Refresh() Exit Function End Try Dim Obj As Object For Each Obj In AcadDoc.ModelSpace If Obj.ObjectName = "AcDbBlockReference" Then RibbonLabel1.Text = "Find Block: " & Obj.Name Me.Refresh() ' Check for attributes. If Obj.HasAttributes Then Dim AttList As Object Me.Refresh() If Obj.Name.ToString.ToLower = "abc" Then ' Build a list of attributes for the current block. AttList = Obj.GetAttributes ' Cycle throught the list of attributes. For _i = LBound(AttList) To UBound(AttList) ' Check for the correct attribute tag. If AttList(_i).TagString = "Text" Then return AttList(_i).TextString.ToString End If Me.Refresh() End If Next End If End If End If Next Obj
But i want to know whether is there any way to get the block named "ABC" directly without looping through all the objects.
I have a block content many attribute. When I'm create the block whit this many attribute, the order of this attribute is not properly. I know autocad have a command to class this many attribute in order but i search it and i don't know where is it.
I need to get the Attribute Collection of a named block which is not been placed in the drawing, but it does exist
Dim paaltype As String Dim acDoc As Document = Application.DocumentManager.MdiActiveDocument Dim acCurDb As Database = acDoc.Database Dim acDocEd As Editor = acDoc.Editor
Using acTrans As Transaction = acCurDb.TransactionManager.StartTransaction() paaltype = "paal01" Dim acBlkTbl As BlockTable acBlkTbl = acTrans.GetObject(acCurDb.BlockTableId, OpenMode.ForRead) If acBlkTbl.Has(paaltype) Then ‘block exist, how to get the attributecollection End If acTrans.Dispose() End Using
How can I add an attribute to a block without the other attributes to move from their position. With the ATTSYNC belongs unfortunately not because the old attributes moved back to the original places that I will not.
I wan't to append a new attribute to a new block. But I get an error that there is no database. The loaded file has no attributes
Dim mDialog As New frmPaalDefinitie() For Each item In lvPalen.Items mDialog.tsPaal.Items(item.imageindex).enabled = False Next mDialog.ShowDialog() If mDialog.DialogResult <> Windows.Forms.DialogResult.OK Then Exit Sub