Jump to content

Search the Community

Showing results for tags 'attribute'.

More search options

  • 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

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...

Found 82 results

  1. I've been looking for a routine that will allow me to transfer an attribute from one block to another. Ideally I'd like to click on one block which contains the attribute I want (from a field called ID_1), then click on another block and copy the attribute to another specific field (ID_2). I need to do this to quite a few blocks so I'd like to just continue to click between the two types of block. I thought I could modify the code on this page http://www.cadtutor.net/forum/showthread.php?32085-Need-Lisp-to-update-attributes, but this appears to place the same attribute on every block I click. Any help is greatly appreciated!
  2. Hello, In this DWG i need to pair text (which is room function) with block attribute "FUNCTION" that i've created. I can do this manually but it's over 1000 blocks ,so that make me wonder is it possible to create LISP which take nearest text into block attribute. I've found that LISP (https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/add-text-value-to-a-block-attibute/td-p/7949545) but it's swaping texts over rooms for example in room where laboratorium is located it name it biuro which is located next to it. Sorry for my plain english, I'm not native speaker. Thanks in advance! test_1.dwg
  3. Hi guys, Im looking for lisp routine that instantly inserts field for measurement of dimension line to an attribute text or specific attribute tag in a block. i.e. I have this dimension line "dim A" and a tag "cutting_length" in the attribute, such that the attribute value will change according to the dimension. Thanks in advance!
  4. Hello, I am student and I need help to make civil drawing to map drawing. I have a drawing which has rf_id and polylines but rf_id is block reference and this is not related to polyline. How can I relate these values together?
  5. I have created Dynamic Block with grips and Attribute linked to the parameter. Now I override that attribute value to a manual value through a program and change the parameter. Now, when I move the grips of dynamic block, the attribute value linked to it doesn't change and remains as manual value. Is there any way/ program to retrieve the relation between attribute and parameter value? Pls find attached Program and Dynamic Block. You can override linked values of "WIDTH" & "LENGTH" by 'double-clicking' on block and entering manual value. Upload & Run the program with command "DChange". This will change the shape of block as per manual value. After this, when you will stretch the grips of block, it will change the shape; but, the attribute value "WIDTH" & "LENGTH" will not change. Can this linking between Attribute & Parameter revived so that attribute values will change with moving grips? Straight Duct.dwg DChange.lsp
  6. Hi, I have a dwg with a bunch of the same block in it (called Cabinet). This particular block has a number of visibility states. I have assigned an attribute (called SetVisState) to the block that I can modify via ATTOUT and ATTIN. I want a LISP routine to check this attribute in each block, then update it's visibility state based on this attribute. Unfortunately I have next to no experience with LISP, so any guidance would be appreciated. I have tried looking around this forum and others, but so far have only managed to run a LISP that checks the current visibility state and then toggles between states (I need it to check attribute value then change vis state accordingly). I tried Lee Macs code for getting attributes, but couldn't figure out how to apply that to my scenario either. Thanks in advance.
  7. Hello Guys, I have a doubt, someone knows if has some Lisp to get the last digits (specified - user input) of a dwg file name (in Windows explorer) and write it on a specific attribute name on a internal block. Eg.: I have a folder with 600 pages dwg files, so, the last numbers of it is a specific item to show the page number of that file, it's possible read these numbers and write in an attribute inside dwg to correct the page index.
  8. Hi, is there a way to save my drawing with its name in a directory by using a Attribute value. Example: Drawingname: test.dwg blockname: TitleBlock Attribute: SF:WE Attribute-Value: test2 And it should save the drawing in: C:drawing/test drawing/(attribute-value)/... but it should be in a dialogbox, so i can choose the specific subfolder the direcotry up to the attribute-value is fix.
  9. Good afternoon, I am very new to LISP and need your help, at this point I can only make minor changes to existing code but a lot of the code still is magic to me. I have a block "ULTRA INFO" with an attribute "CIRCID" that can be used to help turn off a layer with that name that has "-DATA" added to the end. What I think we need to do is to grab the attribute variable and store it, then add a wild card * to the end, lastly have it turn off a layer with that name. Here is my thought: Some how scan the drawing for an attribute named "CIRCID" if it is found store it as "LAName" for later use. Then turn off the layer: (command "-Layer" "off" "(LAName)*" "") Any help possible is greatly appreciated. Thank you all in advance. Brian
  10. Hi All, I want to make a lisp program to add prefix/suffix to all attributes of a selected block. Say, what I want to add is "(W1)". If the block has two attributes and if the attributes have their values 12134 and 23564, it should become 12134 (W1) and 23564 (W1) This process has to be looped so as to enable editing of multiple blocks one after the other. So far I have this; (defun c:w1() (setq n 1) (while (> n 0) (setq ent (car (entsel "Select Block:"))) ;This is where I am stuck. This is where I need to edit the attributes );While );Function Please help...
  11. I've got a ton of blocks, each with the same attribute but different preset values. Obnoxiously, when they're inserted the dialogue box to edit the attribute value pops up (problem described here). I know this can be suppressed with ATTREQ, but I'd rather folks not have to change any settings and for this to work smoothly on its own. So, rather than manually going through and changing each attribute to preset > yes, anyone got a handy LISP for it? Thanks!
  12. Hello I have no idea where to post this so I apoligize if this is the wrong forum, but I was wondering if the following was possible: the setup is that i have a series of blocks that have multiple attributes in them, meant to get them in a list through DATAEXTRACTION. However alot of these attributes will consist out of a code, which isn't usefull to most who will see the printed plans. Is it possible to link a FIELD (or text) to the attribute and display text depending on what the value of the attribute is? (i.e. I'd make the attribute itself invisible) It would be needed that both of these texts are attributes, as they both have to be shown in the list received from DATAEXTRACT. as a random example: if the value = RAL9005 the text displays black if the value = RAL9010 the text displays white etc. Currently i have been messing with the FIELD option Diesel Expression with the following line: $(if,$(eq,$(getenv, Lookup2),test1),"abc","DEFG") Lookup is used to give a dropdown menu to select the initial text (test1) and the second attribute has to show 'abc' when 'test1' is shown on the initial attribute. (the idea was to add multiple if-functions where 'DEFG' is but i'd rather get this bit to work before going on further....) However this is not giving me any results. I suppose I dont have a grasp on how the Diesel expressions work yet so any help would be highly appreciated. thanks for any help.
  13. As posted over at theSwamp, I thought I'd post it here for you guys also CopyText.lsp The program will allow a user to copy the text content from a source object to a selection of destination objects or swap the text content between two objects. The user may select from Text, MText, Attribute, or Multileader objects. Upon choosing 'Settings' the user can alter whether source object formatting should be retained upon copying/swapping to/with objects which permit the use of such formatting. Ideas/criticism/feedback are, as always, welcome Enjoy! Lee CopySwapTextV1-6.lsp
  14. I am pretty keen to know if it is possible to change attribute tag names using lisp (or some other strategy). I have lots of different blocks, and they all have two attributes. The tag for attribute 1 is "X", with a value of "100" The tag for attribute 2 is "Y", with a value of "200" Is is possible to change all the blocks in the drawing, such that the attribute 1 tag is renamed from "X" to "A", and the attribute 2 tag is renamed from "Y" to "B". I would like, if possible, to preserve and leave unchanged the values associated with the respective attributes, and change only the tag. So basically, once the script is done, I will still have blocks with two attributes, one with the tag "A" and a value of "100", and another attribute with the tag "B" and the value of "200". To clarify; I'm not interested in replacing attribute values, but rather changing attribute tag names. Hope this is comprehensible to someone, and maybe even achievable.
  15. Hello! I have a question like this before but after some answer and help i couldnt make it. I have googled for like 15 hours overall and this is my last way out What i need is to extract data of mutable drawings and change for example the description in the "title block". Not the same description for every drawing, thats why I need it to be in excel. "extract data" is good to get information out. BUT i cant get it into the drawings again... I have tried the LISP "Batch Attribute Editor" but the problem is that one change is for all drawing. I want it to be customsable. Maybe there is an program by it owns that can do this changes? Please help me, and see attached for an example. thats the attributes i want to change. BR Johan
  16. Hello all, Im new here and learned alot from you guys. Now i have a problem that i couldnt find an answer to. I have one drawing template/ block with attributes. I want to insert my own templete/block but still use the attributes from the old one. This will be done at multiple drawings at once. I have tried the "extract Data" function but are unable to insert the information back again (multiple drawings) And the best option would be to insert the templete/block and the info without opening the drawings sepretely. If this cant be done in autocad, is there any other software available? See attatchment with 3 exmaples in one drawing. Note that the drawing templates are seperatly normaly BR Johan EXEMPEL template move.dwg
  17. Hello guys, I am trying to increase performance of my work by making some dynamic blocks, unfortunately I have faced a wall :/ I want to make a block with an option to make ONE of it's attribute printable/unprintable (By unprintable I mean for it to be like on defpoints layer), without "hiding" the rest of the block. I tried the "easy way" by changing the layer of the block (in blockeditor everything except THE attribute on specific layer, THE ATTRIBUTE - "0") but then when I switched in model layer to defpoints it doesn't print this block at all. I tried also adding a visibility state, but it looks like it doesn't work well when there are multiple entities of the same attribute (in other visibility states) in one block definition. Is there a way of changing a layer of element for example in lookup parameter? Or maybe somebody can come up with other solution? Regards rusi55
  18. Hello, I created a dynamic block with arrows and an attriboute text. I had to use multiline text because I need background. When I rotate the block the text is not in the good direction on the left side (the other three way is ok). Is it a way to orient to the readable way the attriboute text somehow in the rotated block? Thanks for the answers! TB arrow.dwg
  19. Hi to all! I'am building the title block (block with attributes) and I need a routine that will automatically read layout name, in multi layout dwg, and write it into block attribute „LAYOUT“ for every layout. Field with Ctab doesn't suits my needs... Is something like this possible? Thanks!
  20. As posted at the Swamp, I wanted to share this here too... Having written the first draft of my old 'Global Attribute Editor' program almost three years ago, I thought it was about time I offered something new and improved. And so, I've spent some time putting together a new and improved... Batch Attribute Editor A full description of the program, including some 'Hints and Tips' for using it can be found here; but as a brief summary: the program allows the user to modify the values of multiple attributes residing within multiple attributed blocks across multiple drawings. Upon starting the program using the command syntax 'BAtte' (Batch Attribute Editor) at the command-line, the user is presented with the first of two dialog interfaces: the first screen for input of attribute data; the second for drawing selection. At the top of the first dialog there are three edit boxes in which the user can input a Block Name, Attribute Tag and a new value for such attribute. The program can also process multiline attributes and the attribute value can use Field Expressions. The program also offers the ability to increment an attribute value for each drawing processed. If an attribute value contains markers surrounding numerical data, the numerical section between these markers will be incremented by one for each drawing processed by the program. After attribute data has been entered and a number of drawings have been selected to be processed, the user may click the 'Run' button to modify the listed attributes in each of the select drawings. Some Previews... Attribute Data Interface Editing an Entry Selecting Drawings to be Processed BAtteV1-4.lsp
  21. (defun c:awz ( / sUndo enx atent atent_list) (setq sUndo (vlax-invoke (vla-get-ActiveDocument (vlax-get-acad-object)) 'StartUndoMark)) (setvar 'errno 0) (while (/= 52 (getvar 'errno)) (setvar 'errno 0) (setq atent (car (nentsel "\nSelect multiline attribute to change Defined Width to 0: "))) (cond ( (= 7 (getvar 'errno)) (prompt "\nNothing Selected.") ) ( (null atent) (prompt "\nExit.") ) ( (/= "ATTRIB" (cdr (assoc 0 (setq enx (entget atent))))) (prompt "\nSelected object is not an Attribute.") ) ( (= 4 (logand 4 (cdr (assoc 70 (tblsearch "layer" (cdr (assoc 8 enx))))))) (prompt "\nSelected Attribute is on a locked layer.") ) (if atent (setq atent_list (entget atent)) (setq atent_list (subst (cons 41 0) (assoc 42 atent_list) atent_list )) (entmod atent_list) )) (if sUndo (vlax-invoke (vla-get-ActiveDocument (vlax-get-acad-object)) 'EndUndoMark)) )(princ) )(vl-load-com)(princ) by researching past codes from pros like Lee Mac and Grrr, i was able to create this lisp all on my own. At work we have a program that inserts Blocks with a multiline attributes with information set in them and each value is it's own line of text. Unfortunately, sometimes, by that i mean most of the time, if a space is inside the information, it'll "word wrap" and create a new line. It is very annoying having to double click the attribute, then "..." and then change the width of sometimes over 100 attributes. Out of frustration, this Code was born. I welcome everyone to criticize this code as much as they can, i like learning how others would have written it. what i added that wasn't needed, what i needed that wasn't added, what would have been an easier approach. don't hold nothing back! If i didn't give credit to some of the original creators of the code that inspired me, i apologize. you guys deserve all the credit.
  22. Can a lisp programmer review my code to find out what's not working? This code will restore an attribute's grip when used with BricsCAD, Draftsight Professional, ZWCAD 2014, 2015, 2017.... But doesn't work in AutoCAD which is what I use most of the time. The grip apparently is controlled by LOCKED option when creating the attribute tag. ; ULMA - Work properly in ZWCAD, Draftsight, and BricsCAD...but not AutoCAD ; UnLockMyAttribute ; Steve Remenda ; July 30/2014 ; July 5/2016 Tried again to get grips turned back on. no success. ; DXF code 280 lock position flag within the block reference should be 0 (defun c:ulma ( / cmd enam edat1) (setq cmd (getvar "cmdecho")) (setvar "cmdecho" 1) (setq enam (car (nentsel "\nSelect Select attribute turn on grip: "))) (setq myinsert (cdr (assoc 330 (entget enam)))) ;get the block (setq my280 (cdr (assoc 280 (entget enam)))) ;get current 280 cons value (if (= my280 0) ;if the attribute is locked (progn (setq myval 1); 1 to show grip (setq edat1 (subst (cons 280 myval); ; Change the DXF code pair (assoc 280 (entget enam)) (entget enam) );subst );setq - this does display the list and cons 280 does show a 1 (entmod edat1) ; but this returns nil. Should it? (entupd enam) ; this should update the attribute (entupd myinsert) ; this should update the block ); progn then when lock is visible (progn ; Else attribute is something else (initget 1 "Yes No") (setq x (getkword "\nThis attribute grip is already on. Do you want to turn it off? (Yes or No) ")) (if (= x "Yes") ; if user wants to apply italics (progn (setq myval 0); 0 For No grip (setq edat1 (subst (cons 280 myval) ; Change the DXF code pair (assoc 280 (entget enam)) (entget enam) ); subst ); setq (entmod edat1) (entupd enam) ); progn to make attribute visible ); if Yes response );progn Else attribute is something else ); if an attribute is selected. (command "REGEN") (setvar "cmdecho" cmd) (princ) ) ;ulma - UnLock My Attribute
  23. AutoCAD LT 2016 - type att - type test_attribute as the attribute tag - place it - the attribute has name TEST_ATTRIBUTE is there a setting that controls that behavior? I don't want to use capital letters. I can change it in Properties, but that's a workaroud.
  24. i want my attribute to rotate from 90 to 270 using flip action. but when i added a flip action on my attribute, the action only works on newly inserted blocks. when i created as new text,mtext or attribute inside a block, any flip action doesnt work, and keeps its rotation. how can i make it work?help.dwg
  25. Hi All, I'm looking to see if there is a Lisp out there that as you copy a block in a drawing the first attribute with change in increments of 1 I.e. P1 P2 P3 Thickness " " " " Material " " " " (1) " " " " P1 Would be the attribute that changes every time it gets copied. Thanks Brain