Jump to content

Search the Community

Showing results for tags 'attribute'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • CADTutor
    • News, Announcements & FAQ
    • Feedback
  • AutoCAD
    • AutoCAD Beginners' Area
    • AutoCAD 2D Drafting, Object Properties & Interface
    • AutoCAD Drawing Management & Output
    • AutoCAD 3D Modelling & Rendering
    • AutoCAD Vertical Products
    • AutoCAD LT
    • CAD Management
    • AutoCAD Bugs, Error Messages & Quirks
    • AutoCAD General
    • AutoCAD Blogs
  • AutoCAD Customization
    • The CUI, Hatches, Linetypes, Scripts & Macros
    • AutoLISP, Visual LISP & DCL
    • .NET, ObjectARX & VBA
    • Application Beta Testing
    • Application Archive
  • Other Autodesk Products
    • Autodesk 3ds Max
    • Autodesk Revit
    • Autodesk Inventor
    • Autodesk Software General
  • Other CAD Products
    • BricsCAD
    • SketchUp
    • Rhino
    • SolidWorks
    • MicroStation
    • Design Software
    • Catch All
  • Resources
    • Tutorials & Tips'n'Tricks
    • AutoCAD Museum
    • Blocks, Images, Models & Materials
    • Useful Links
  • Community
    • Introduce Yourself
    • Showcase
    • Work In Progress
    • Jobs & Training
    • Chat
    • Competitions


  • Programs and Scripts
  • 2D AutoCAD Blocks
  • 3D AutoCAD Blocks
  • Images
    • Backgrounds

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...

  1. Hello, I'm trying to make blocks with attributes and i watched video on youtube to do so .But when I insert the same block I need to name the tags twice. I don't know how it happens and it bugs me. Please help! A second question is that when I load the block in another dwg file, the base point isn't the same as it was on the existing file. how does this happen and how can i reset the point? and please use simple words because I'm from the Netherlands and I only know basic English:( thank you very much, Pakowano
  2. Hi all, I have a drawing with Attributes and Dimension. I want get value Attributes and Dimensions to Excel (2010) (view file Now.rar attachment). Please, help me get value Attributes and Dimensions to Excel by autolisp. Thank you very much! File: Now.zip
  3. Hi guys, When I insert a dynamic block containing text attributes, it brings up a list of questions for me to fill in the information (as normal). For convenience, I would like them to appear in some sort of logical order. Does anyone know how this can be achieved? To rearrange the list?
  4. I am a little new to assigning attributes. My company had a block with two attibutes that I need to alter. When the block is inserted, it asks a quantity. The other attribute is titled location. I am told if needed, all these quantities can be totaled per drawing. It has a title of "location". Two things: Can someone explain how to replicate this action? And is there a way to show all properties of a field for an attribute? Thanks, Nobull
  5. Hey All, If you are familiar with the "Fields" associated with text attributes, you may be able to answer my question.. If you set up a date to fill-in automatically when you open a drawing, will it update from day to day? Or once its set up, will it remain on that date..? Please let me know if i am unclear..
  6. I am trying to simplify my companies current process of updating BOM. We currently type all part dimensions in an excel spread sheet to get the weight of different group of materials. I wanted to make a lisp that after changing one or many of the dimensions in the BOM blocks it would recalculate the weight, avoiding any typo errors when manually recalculating. Ideally it would compare the item number (eg "37014") and then multiply the 2 dimensions and quantity. Then add all of items and put the total in the bottom right block of that group (eg "753.5") I am not sure how to start this lisp any help will be greatly appreciated. all the blocks are called "97bill" and the attributes are "bubbleno" "qty" "material" "itemnumber" "total-units". Thanks
  7. We have a drawing border that uses four lines of attributes for tracking revisions. I'd like to write a routine to move the values in each line up one line, so the latest revision is always on the lowest line. I can extract the attribute tags and their values into an associated (dotted pair) list easily enough. Since each line has attributes that are prefixed with a '1_', '2_', etc, I thought it would be easy to simply iterate through the list to change those numbers. It turns out that I was partially right. The list is easy to get, working with dotted pairs is not. My list looks like this: ("1_REV" . "1") ("1_DATE" . "04-11-13") ("1_DESCRIPTION" . "ADDED A BUTTERFLY VALVE TO THE BYPASS LOOP") ("1_BY" . "ABC"). I'd like to change all the instances of '1_' to '2_' in the list. I might be making this too hard, I know I could simply store those values to variables and then just create a new list, then push the new values into the block attributes, but that seems somewhat inelegant.
  8. Hi all, could you please give me a solution to update block attribute value in multiple layouts with out changing the existing values. eg: Tag DT3 Value "part-01" I need to edit the value as "MEP Part-01" The multiple layout have different numbers. So I need to add "MEP" to all layouts. Thanks for reading
  9. Can a AutoLISP command be written to read an attribute in a block and draw a circle with the attribute as the diameter using variables? The appilcation is taking the diameter of a tree trunk (the attribute), multipling by 12, and drawing the canopy circle on hundreds of those blocks. So the circles drawn will vary in size. Not sure how this could be set up, i'm NOT familiar with LISP writing AT ALL. 1) Read block, single, mulitple or definition? 2) Read Attribute 3) Varaible of attribute, (attribute is an inch measurement...it needs to be multipled by 12 to get feet for final use as circle diameter drawn) 4) Draw circle, variable, with diameter coming from attribute variable (attribute in inches that is multipled by 12) 5) Center point or circle to be block's base point Thanks everyone, always such great help here!
  10. Hi guys, I have a requirement to create a block with a few attributes, but the attributes require a bit of composition behind the scenes. Here's an abstract example. I need a block that represents a computer's identity. Each computer has 2 references that need to result in attributes that I can extract. One attribute is a unique reference across the project, and the other attribute is a room reference, and many computers can be in the same room. Here are some example references. Computer A Unique Reference: DF.SALES.01 Room Reference: DG.SALES.07 Computer B Unique Reference: DF.SALES.02 Room Reference: DG.SALES.07 Computer C Unique Reference: DF.SALES.03 Room Reference: DG.SALES.07 Computer D Unique Reference: DF.ADMINISTRATION.01 Room Reference: DG.ADMINISTRATION.02 Computer E Unique Reference: DF.ADMINISTRATION.02 Room Reference: DG.ADMINISTRATION.02 As you can see from the above, the 'common' part for a computer is the middle 'SALES' or 'ADMINISTRATION' part, which 'technically' only needs to be put in/typed in by the user once for each computer. I need to automate this process to reduce user input error, such that they only enter 'SALES' or 'ADMINISTRATION' once and don't end up creating the below, which would be invalid. Computer F Unique Reference: DF.RECEPTION.09 Room Reference: DG.SALES.07 Thus I imagine I need a third property/field/attribute to specify 'room', and then formulate the Unique Reference and Room References, using this 'room' part in the middle. The end goal here is that I need to be able to extract the above two references for each 'computer/block' and get them into Excel, and I need to be able to modify the 3 properties (room, unique reference and room reference) quickly, ideally using something like EATTEDIT, which is how we have edited attributes in the past. Apologies that this may seem like an odd request! The use case above is abstracted, it's actually not for computers at all but I figured it would make more sense than complicating it with the actual application! Many thanks in advance for any thoughts.
  11. I have made a few blocks that contain a few attributes. I have populated the Tag, Prompt, and Value for each block. When I insert the block the value seems to take on a life of its own and populate with text different than what I have entered. Any Ideas?? Block.dwg
  12. Hi All, I'm having trouble getting my attribute definitions to work with my blocks. I'm trying to create a tag that can flip around (dynamic) and have a tag number easily entered (attribute). I notice that I could only get the attribute definition to work during a drawing insertion is when I wblocked out my block and inserted that drawing file. I was not able to insert the drawing file that had the block in it. I can't seem to make a dynamic block drawing file, and then insert that dynamic block drawing file if I want the attribute to work.. Do you understand?? EDIT: I got it after more fidgeting...
  13. I have a dynamic block which have some attributes and I'd like to get the contents of the attributes. For example, if the block has 2 attributes, attr1_size and attr2_color, and the value of attr1_size is small , and the value of attr2_color is red, what I need is a list , (attr1_size small)(attr2_color red) I thought the (vlax-invoke (vlax-ename->vla-object block_name) 'GetAttributes) will do this, but the result was like this. (# #IAcadAttributeReference 0eef3e54>) Is there any way to get the attribute value from the random sequence? Or, any other code to get the value? What I finally want to do is clicking a block and automatically insert some new figures according to the value of an attribute. Thank you!
  14. I have difficult time finding a command that would match a block's attribute (text height, text rotation, and text scale) with a source block. I had found a LISP routine that would match the block itself with a source block but it did not include attributes. I don't need to match attibute values, just the properties. I'm using AutoCAD 2012 with regular blocks (not dynamic)
  15. So, to give some background information, I have 0 experience with LISP programming, and am an intern at an engineering company. I really would love to score "brownie points" by automating an extremely boring and time consuming task. I have experience with other languages, and can work off of a good base. So here's what I would like the routine to accomplish: 1.) Figure out the name of the title block (the title block will be in the same location on each and every file) 2.) Use that name to modify 5 attribute values of that block (each title block has the same attribute tags: NAME, DRAWING_NUM, SN, DATE, DESIGNER) 3.) Save in a new location. So, for example, lets say the drawing I want to modify is at the location C:/USER/ME/, and is called drawing1.dwg. Lets say that it's title block is called "blanksheet", the routine then needs to modify the 5 attributes (NAME: DrawingName, DRAWING_NUM: 123456, SN: 000, DATE: 10 10 12, DESIGNER: Me) of the block "blanksheet". Then, after it modifies everything, saves it in the location C:/USER/YOU, and is called drawing2.dwg. I'm not even sure if this is doable within the bounds of AutoLISP, so any feedback is appreciated. Thanks in advance!
  16. Hello all, I have two blocks with different attributes. want a connection between the two blocks especially in the areas marked in yellow. node when the value changes from 56 to 101 to make update the labels. Attach an example. best regards Sample Annotation Pipe for link.dwg
  17. I am trying to create a custom attribute editor by using fixo and metal_pro's code as a base but I'm getting runtime error '424' object required. The de****** is pointing out line AttList = oBlkRef.GetAttributes but I can't figure out what's wrong. I know the basic's of VBA but i'm new to it, so any help would be appreciated. Option Explicit Dim oBlkRef As AcadBlockReference Sub Change_it() Dim inspt As Variant Dim oEnt As AcadEntity Dim i ParentSymbolForm.Hide ThisDrawing.Utility.GetEntity oEnt, inspt, "Select object:" ' Checks if you selected a block. If TypeOf oEnt Is AcadBlockReference Then Set oBlkRef = oEnt ' Check for attributes. If oBlkRef.HasAttributes Then Dim AttList As Variant ' Build a list of attributes for the current block. AttList = oBlkRef.GetAttributes ' Cycle throught the list of attributes. For i = LBound(AttList) To UBound(AttList) ' Check for the correct attribute tag. If AttList(i).TagString = "TAG1" Then ParentSymbolForm.ComponetTag.Text = AttList(i).TextString End If If AttList(i).TagString = "DESC1" Then ParentSymbolForm.TextBoxDesc1.Text = AttList(i).TextString End If If AttList(i).TagString = "DESC2" Then ParentSymbolForm.TextBoxDesc2.Text = AttList(i).TextString End If If AttList(i).TagString = "TERM01" Then ParentSymbolForm.TextBoxPin1.Text = AttList(i).TextString End If If AttList(i).TagString = "POS1" Then ParentSymbolForm.TextBoxSwPos1.Text = AttList(i).TextString End If Next End If ParentSymbolForm.Show Else MsgBox "You did not select a block." End If End Sub Private Sub SelectButton_Click() Call Change_it End Sub Private Sub ChangeButton_Click() Me.Hide Dim AttList As Variant Dim i ' Change attributes for the selected block. AttList = oBlkRef.GetAttributes ' Cycle throught the list of attributes. For i = LBound(AttList) To UBound(AttList) ' Check for the correct attribute tag. Select Case AttList(i).TagString Case "TAG1" AttList(i).TextString = ParentSymbolForm.ComponetTag.Text Case "DESC1" AttList(i).TextString = ParentSymbolForm.TextBoxDesc1.Text Case "DESC2" AttList(i).TextString = ParentSymbolForm.TextBoxDesc2.Text Case "TERM01" AttList(i).TextString = ParentSymbolForm.TextBoxPin1.Text Case "POS1" AttList(i).TextString = ParentSymbolForm.TextBoxSwPos1.Text End Select Next End Sub
  18. Hi, Recently I've gotten into this type of problem. Have an ATT "A" that is set. I can change it and it will change. But I also have an ATT "B" which works the same way as the "A". I've added a MTXT into the block so that both ATT's A and B will work together, meaning they will always be in a dead center - something like text (no matter what the string is, you can Align it Middle Center), using a FIELDS option, and parameter set to VALUE. It works when placed into the drawing, but need something that once I place the block and want to edit the VALUE, the Fields will update/sync. I'm asking for some guidance from you guys. Thank you in advance for the help. Vee A and B.dwg
  19. Is there any way to rename a tag without using battman? I need to replace some drawing borders and some of the attribute tags on the new border are named differently from the tags on the old border. I'd like to be able to use transparent commands to make a script file to do it automatically instead of calling up battman, clicking through and typing on every single one.
  20. I have hundreds of drawings with attributes that are duplicated. I can't go through each individual drawing, call up BATTMAN and delete them one by one. I need a way to automate the process. The duplicates always show up in EATTE and show up most of the time in BATTMAN. I need a lisp that will find and delete duplicates shown in RED while leaving the originals intact. Can anyone help?
  21. Hi all, I am jumping 8 versions to 2012 and have found many great changes and some surprises. I've located this command but it changes the all text strings that match? I tried naming the block but that didn't work. Can anyone enlighten me? 2. Gobal edit – Modify > Object > Attribute> Global. Command is –ATTEDIT – a. Editattribute one at a time > enter N b. Editonly visible on screen > enter N c. Enterblock name specification > enter d. Enterattribute tag specification > enter e. Enterattribute value specification > enter f. Enter string to change > enter text makingsure it is case sensitive g. Enternew string > enter text
  22. Hello Everyone! As my first post I'm going to give a doozy. I've searched and searched, but can't find a lisp or info that helps me with my problem. Maybe I can find some help here - even though I've already turned grey, I'd still appreciate it. So, here we go... I insert attributed blocks into my drawings that list part number, model number, etc. Along with these attributes, there's another tag that is an incremental number (used in our Bill of Materials). If there are two identical parts (i.e., same model number), the incremental number needs to be the same; if the parts are different, the next sequential number needs to be used. Doing this by hand is not only time-consuming, but tends to be extraordinarily erroneous. So I'm looking to make a lisp routine that I can run to auto-number these blocks. I'm thinking that I can insert my blocks (or re-use them, copy, etc.) without too much concern over the number tag, then run the lisp at the end to give the numbers to each unique block. It'd be nice if any numbers already there could stay the same (we re-use drawings all the time). Block: BOMTAG Tags: ITEM (Increment Number) MODEL (Model Number) PART (Part Number) I don't know a ton of lisp, so I don't know that I can make it on my own, but maybe a nudge in the right direction could keep me from wasting a bunch of time. Any ideas? Make a list of blocks, do something with them, give if-then statements, re-number if needed, move to next block. Easy to type, hard to program. Free rendering to anyone who gets the winning code. Thanks so much, I appreciate any help. -stu
  23. I need to use detail callouts on a regular basis. They all have to look the same, even though some appear in paper space and some in model space. I've gone to a user block. The attribute style has a width factor of 1.25. I overrode it in the block and changed it to 1.00. When I draw a multileader with this style, the block has text with width of 1.25. AutoCAD has overridden my override. On a similar note, when I change the multileader definition from the default _DetCallout to the user-defined DetCallout (note the underline), the existing multileaders don't update, and I can't figure out how to make them update. Is it a bug, a quirk, or something else? Does it really matter what you call it if they never fix it?
  24. I have a routine that replaces one block with another block based on the block name. I need help making it run only if a specific string of text is found in one of the attributes within the found block. Can someone help? Thanks. (defun c:name () (setvar "attreq" 0) (setq ssblocks (ssget "x" '((0 . "INSERT")))) (if ssblocks (progn (setq lstblockmap (txtfile2lst "C:\\path\\filename.txt" ) ) (setq lstblocks (sel2lst ssblocks)) (foreach enblock lstblocks (setq strblockname (car (getval (setq stroldname (strcase (getval 2 enblock))) lstblockmap ) ) ) (if strblockname (progn (prompt (strcat "****** " strblockname " found.******")) (progn ;;;;;Do more code ) ) (progn (prompt "No block definition, Skipping...") ) ) ) ) ) )
  25. I'm trying to create blocks which will be used in multiple drawings for Gridlines and detail marks. These blocks are basically a circle with an attribute in the centre, and once created as a block are annotive as they will be displayed in multiple viewports. I can create the block with attribute fine using the "block" command which then allows me to make the block annotive ( The "wblock" command dose not allow this ) However when I insert the block into a drawing I need to explode the block before I can edit the attribute ( even though I explode the block it's still actually blocked ) It's as if the block has been blocked twice, Any ideas?
  • Create New...