Jump to content

Search the Community

Showing results for tags 'attributes'.

  • 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. I'm trying to see if this is possible. Drawing with many dynamic blocks, all with many attributes. Was curious if there was a routine that would select a single block - enable user to fill in the attributes click OK - then move onto the "next" block in the drawing until complete. Anything like this remotely possible?
  2. Hi, i am no autolisper, and i am having trouble to adapt this excellent lisp made by Tharwat to my use... My problem is with the attributes upon insertion, after the command, no attribute appear on the drawing. I will not post my attempts on doing so, (for they are really messy...) but the original code and the description of what i inttend to do. My block has 3 attribs, ID, KM and M. ID must be prompted by user upon inserction; KM must be taken from the lwspline length (variable l), i.e.: if swpline is 350120,00 m long, then KM is 350, if swpline is 120,00m long, then KM is 000; M must be treated the same way as KM, but in 350120,00, M is 120 and so on... The text output format on the drawing is "km 350+120" Test.lsp [ATTACH]58954[/ATTACH]
  3. I've been trying to find existing lisp routines to do the following for a while now (off and on). While I have found some that will change values of Attributes or the text width for every piece of text in a drawing, that is not what I need done. I need a lisp routine that will be manually modified with the current Attribute TAG and Block name based on client titleblock. It can't require manual selection (user input) as this will be used in a script to batch run the lisp routine. To kind of summarize, I would like the ability to specify a block name and attribute tag name (in the specified block) and be able to set the text width factor in the drawing to account for longer filenames per client requests. This is only for the 1 attribute in all drawings. Any help will be greatly appreciated. Here is an example: Titleblock has: Attribute: File name TAG: DRAWINGNO Value: Linked to actual filename with a field Current text width factor is .8 and it needs to be .7 to fit within the titleblock space.
  4. Hi all, I'm trying to edit attributes in a block - about a hundred of them. I'm using ATTSYNC, but when I choose the block, the error"the selected block has no attributes". I look in the properties window and it lists it as a "block reference". I've tried BEDIT, but when I click it - no attributes show. So, I'm curious if this "block" was created in some different fashion? Weird, that this has not come up before. Many thx
  5. Hi there, I have many different blocks with different attributes and custom properties (rotation angle, position 1 X, position 1 Y, and so on). All of them have a perfect correspondence between attributes names and custom properties names. For example, if i have a block with custom properties "rotation_head" and "position_head" i will have two attributes called "rotation_head" and "position_head". I'd need a lisp with two functions cycling through all the selected different blocks; one of the function would: - for each selected block, read the attributes and set the custom properties while the other would: - for each selected block, read the custom properties and set the attributes. Do you think something like this would be possible? The reason behind this kind of request is because i need to import and export shapefiles to autocad map and i need to set blocks custom properties using shapefiles table.a Thanks in advance for any ideas/tips Regards GTK
  6. I work with AutoCad Electrical. I've been using an amazing Lisp file by Alan J. Thompson (who is a frequent contributor) call Match Attributes Values and it has been a enormous time saver. However, with AutoCad Electrical, the electrical blocks called "components" have an attribute called Tag1 that gives the component its uniqueness. It is this (and only this) attribute that I DON'T want to change when I copy all attributes between these blocks. I attached the wonderful MAV code. (I hopes that's okay.) Can someone help me in modifying the code that would change all attributes except one labelled "TAG1". (and maybe one or two others possible additional tags--for future.) Thank you for any help. mav.lsp
  7. I'm trying to develop a dynamic block that takes two attributes input from the user (lets call them "x" and "y") and then divides them by the distance ("dist") of a line within the block that may be stretched. Then the result of this formula ((x + y) / dist) is to be displayed as an M-TEXT within the block definition. The problem I'm experiencing is that no matter what I do I can't convey the value of the attributes to the M-TEXT within the block - It only shows their default values and there's nothing I can do to update it with the current attribute values for the block. In other words: Lets say my default values for "x" and "y" are "0" and "1", respectively. I then change the value of "x" to "10" and "y" to "20" on the instance of the block. My M-TEXT has a field in it that references a "formula", and the formula references object->value for both the x and y attributes: "x + y" as the formula. However instead of showing me "30", the block instead shows "1" as these were my default values. I've attached the file I'm working with as an example (although the fields are named differently than what's here). I've posted the question to AutoDesk's forums as well using a more true example of what I'm doing (I simplified it here because it's been difficult to explain what the problem is), so if you would like to read my other attempt at explaining the problem, check out: http://forums.autodesk.com/t5/autocad-2013-2014-2015-2016/value-of-attribute-doesn-t-show-up-when-used-within-formula/td-p/5878314 WIP.dwg
  8. I'm trying to modify Title Block Attributes values using -attedit without being prompted for old value of the attribute. The only way I was able to make it work is as shown below if I specify old value (100). I'm trying to write an external script (.scr) which will be specified upon draftsight.exe startup, open the drawing, modify title block attributes, save and exit without human interaction. The script does not know the old value, that's why i'm trying to avoid it. I'm using draftsight. : -EDITBLOCKATTRIBUTE Default: Yes Confirm: Edit block attributes one at a time? Specify Yes or No» n Performing global editing of block attribute values. Default: Yes Confirm: Edit only attributes currently visible? Specify Yes or No» n Default: * Options: * to select all blocks or Specify block(s)» MY_TTL_BLK5 Default: * Options: * to select all attributes or Specify attribute name(s)» DRAWINGNO Default: * Options: * to select all attribute values or Specify attribute value» 100 1 block attributes selected. Specify old text string» 100 Specify new text string» 101 Thank you.
  9. I have been working on a lisp program that will change one or multiple attributes on one or more blocks. I would however like to be able to add the current attribute values to the .dcl program, however I cannot manage to get attribute values for more than one block at a time. For example if you had two identical blocks with two separate attribute values (values not tags) and you pick both at the same time, when you open your properties window it will list the identical values (if any) and list the different values as "varies". Is there any way I can get this exact thing in autolisp? I am using vanilla lisp not visual, any help would be appreciated.
  10. Okay guys so here is what I am looking for, I want to write a lisp or modify an existing lisp, that will select blocks within a given selection frame and summarize the attribute data in table either in the drawing or an excel file. I found LeeMac's awesome program "Count Attribute Values" but my issues is that for right now its still way over my head so I am having difficulties following much of it. Also I would like to limit it to blocks with a certain name(s) and then within that block only summarize one specific attribute because the blocks have a count attributes which isn't necessary. If anyone can give me some guidance or something I can build off of it would be greatly appreciated. Also I know EATTEXT can do this but I am looking for something substantially quicker.
  11. Hi All, I am working on slowly creating some new standards for my office and am starting with some drawing tag blocks. What I need to know is if there is a way to have geometry stretch/move according to the length of a text attribute? For example, the tag name + some geometry that follows as a stylistic part of the tag. I made a block where the geometry in question is attached to a linear dimension attribute and I can use a grip to move it wherever I like. What I need, ideally, is a way where this follows the size/length of the text automatically. After searching the forum, there were one or two similar questions from several years ago, but no solid answers. Any help would be great. Thanks!
  12. Hi, I'm "newish" to this site, I use it a lot but this is the first time I actually post something I have a problem; The company I work for has a title block set up, they have a personalised company dropdown menu to insert the title block into your drawing, once inserted it prompts you to fill in the information, job number, name, etc.. I can only assume that this is an attribute. Problem is the text inserted isn't centred correctly and I would like to fix this. When I open the title block template drawing, there appears to be no attributes, and in the space in which the prompted text is located is completely empty. Any clues as to why this is? and how I can find the location of this attribute text? I have tried ATTEDIT and ATTDISP and all the other ATT.... and it's telling me that I have no attributes in this drawing. If I have no attributes then where is this prompted text coming from? Help
  13. Hi all. I am trying to improve my efficiency with our drawing time. One way I can speed up the process is to fill out the title block on one layout and for it to appear the same on the other layouts. My problem is getting it to happen, so I hope someone can help me out. I have the title block set up with attributes, and although the Gatte command works it is not quite what I am looking for. I have set up fields, customized drawing properties, and tried to set up sheets in the manager. Either I am missing a step or going about it the wrong way. Can anyone help in pointing me in the right direction? Thank you.
  14. Hi everybody, I have had a look through the forums and haven't been able to find what I need, I am really sorry if this is a simple question that has been asked several times but here it goes anyway! I am trying to create a new drawing title block. Within the block I would like to have each of the parts (scale, drawing number, client etc etc) editable. I have seen it done where numerous bits of text from different parts of the drawings can all be edited from one pop up window... Again I am very sorry if this is a stupid question but any help would be hugely appreciated or indeed a pointer at a thread that answers the question. Thanks again
  15. Hello Sirs! I would like to array some attributes which are inside a dynamic block. I started based on a finded file (SectionSample.dwg) but I can array only the lines without the attributes. I don't know how can I array they like in the sample dwg, how can I make the secound Lookup command. (see Drawing1.dwg) Could anybody help me? SectionSample.dwg Drawing1.dwg
  16. Hello forum, I have been searching far and wide for this and found nothing that exactly does it. Attached is a block, this block contains some attributes: Name, Family name, Phone and a reference number. Theses four are enclosed in a box with an associative solid hatch at 25% visibility in the backgroud. As of right now, it's a dynamic block with a stretch action that is used to make a bigger box for enclosing bigger attributes (A name with 15 characters, for exemple). So, it implies doing it manually every time, for every blocks and whenever I redefine the block. What I want it to do, obviously, is to automaticly detect the longest attribute between the four and ajust the box to the new size without user intervention. All the commands or LISP I found have failed me, they all works wonders with MTEXT but not with attributes. Is it possible to do it within the block or does it have to be done in the drawing after being inserted? Thank you, BLOC_POSTE.dwg
  17. Is there any way in LISP to insert a block with specific scales for the different axes? ie, 100 for x-axis, 50 for y-axis and 100 in z-axis. I don't want to see dialog boxes, I want to be able to scale the axes in lisp.
  18. Hello all, I am attempting to extract a list of all blocks and their attributed text into excel (from which to build a BOM). Using the dataextraction commands works, but there are a lot of button clicks (aka places where users could get confused or click the wrong thing). I tried using -dataextraction, but for some reason using the command line version does not let me search for objects in the current drawing. Opening the extraction wizard confirms this - whenever I load a template, even if I selected "also search in current drawing" when making it, it's unchecked by default. Something like Lee Mac's program MacAtt might work, but it doesn't have a command line version. I've also tried using the code from this thread http://www.cadtutor.net/forum/showthread.php?50663-Data-Extraction but upon running it, I get "error: quit / exit abort" I'm thinking there is a way to do what I want through the "ATTEXT" command, but every time I try to use it, it says "0 records in extract file" and the output file is blank. Anyone have ideas about what else I can try?
  19. I have been experimenting with a title block with attributes and wouldn't you know it, the second I put it out to general usage it goes wrong The text THIS SHOULDN'T BE HERE is obviously the problem, but both in size and position, it should be left justified towards the top of the Title box. I have opened the block and the attribute is where I want it. I Ran ATTSYNC and BATTMAN -> Sync in block editor then again outside of the block editor to no avail. Then I tried ATTSYNC in model space, nothing happened, but when I do BATTMAN -> SYNC in model space it corrects the text size and position but when I click OK to come out of the dialoge box it goes back to where it was before. Any help appreciated as I don't use attributes that often or in that much depth. Drawing2.dwg
  20. I'm trying to add some attributes to an existing block using the block editor, but after I save and close it I cannot see any 'placeholders' despite adding a default value and the attributes work fine when I double click the block. I've tried using the ATTSYNC and BATTMAN commands but nothing helps and there are no invisibilty states applied to either the attribute or block and all layers are switched on. I just tried making a quick block from scratch and it seems to have the same affect, except the default value will show, but no 'placeholder' shown if left blank. I swear with previous version I could see the tag when a value hadn't been applied, so is it that the version I now use (2012) does not have this feature or it's disabled? Thanks in advance.
  21. I am looking into creating a excel spreed sheet that will be used by our company. The excel spreadsheet will be used for getting data (revision status) from a list of selected drawings. In excel you will select the file location and then the list of drawings that you would like the data from. Autocad might need to be opened but can run in the background. Now the main question once the code is completed in excel can it be used in Autocad 2013LT If I am confusing people basic idea. open excel file. run data extraction on selected cad files. sort data by drawing number.
  22. I'm struggling to create an MLeader object with MText: \LCONSTRUCTION NOTE:\l\P[ATTRIBUTE] I wish to: 1) use command "ATTOUT" to create a text file "[drawing]ATTOUT.txt" in the drawing folder (in Windows Explorer) containing a seperate block named "POINT" with attribute [POINT] and MLeader(or block) named "CNOTE" with attribute [CNOTE], 2) change [CNOTE] value for all [POINT] values in Excel workbook, 3) save Excel workbook to (Tab-delimited) "[drawing]ATTIN.txt" in the same drawing folder (in Windows Explorer), 4) use command "ATTIN" to change [ATTRIBUTE] and [POINT] values. I'm running AutoCAD 2014 Map3D, Windows 7, and Excel 2010. Thank you for any advice or routines to make this possible!
  23. Hi, I have a drawing template with a title block containing attributes title1, title2, title3, title4, title5, dwg1 and dwg2. I need to map title1, title2, title3, title4, title5 to title description and dwg1, dwg2 to DWgdesc in TEAMCENTER (PLM software). So I need to write an autolisp programme for creating two new attributes in my drawing template i.e titledesc and dwgdesc and add them into my existing title block. After that I need to concatenate title(1 to 5) into titledesc and dwg(1 to 2) to dwgdesc attribute. Please help regarding this issue.
  24. Hi, i have created some dynamic titleblocks with text attributes in title column. I have gone back an added some more attributes at a later date and these new ones will not move with my dynamic stretch! I have tried everything, modifying the action, re-doing the action, nothing works! Help!
  25. Hi all, I have got this code by KEAN WALMSLEY. His code will ask user to select a block and then list all of selected block's attributes. However, I need to tweak his code a little bit and instead of user interaction, the block has to be selected by its name and through my code. Here is his code (with slight changes to suit my purpose): Private Sub ListAttributes() Dim ed As Editor = Application.DocumentManager.MdiActiveDocument.Editor Dim db As Database = HostApplicationServices.WorkingDatabase Dim tr As Transaction = db.TransactionManager.StartTransaction() Try Dim filList As TypedValue() = New TypedValue(0) {New TypedValue(CInt(DxfCode.Start), "INSERT")} Dim filter As New SelectionFilter(filList) Dim opts As New PromptSelectionOptions() opts.MessageForAdding = "Select block references: " Dim res As PromptSelectionResult = ed.GetSelection(opts, filter) If res.Status <> PromptStatus.OK Then Return End If Dim selSet As SelectionSet = res.Value Dim idArray As ObjectId() = selSet.GetObjectIds() For Each blkId As ObjectId In idArray Dim blkRef As BlockReference = DirectCast(tr.GetObject(blkId, OpenMode.ForRead), BlockReference) Dim btr As BlockTableRecord = DirectCast(tr.GetObject(blkRef.BlockTableRecord, OpenMode.ForRead), BlockTableRecord) ed.WriteMessage(vbLf & "Block: " + btr.Name) btr.Dispose() Dim attCol As AttributeCollection = blkRef.AttributeCollection For Each attId As ObjectId In attCol Dim attRef As AttributeReference = DirectCast(tr.GetObject(attId, OpenMode.ForRead), AttributeReference) Dim str As String = (vbLf & attRef.Tag + " " & attRef.TextString) ed.WriteMessage(str) Next Next tr.Commit() Catch ex As Autodesk.AutoCAD.Runtime.Exception ed.WriteMessage(("Exception: " + ex.Message)) Finally tr.Dispose() End Try End Sub Now, I need to change this Sub to a Function as below: Private Function ListAttributes (blockName As String) As Boolean The goal is to list all block attributes if the 'blockName' exists in drawing and return True afterwards. Oppositely it should return me False and print nothing to Editor if blockName does not exist. Can anyone help me please? Cheers
  • Create New...