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


  • 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...

Found 87 results

  1. Hi, I have 3 drawings, each with 50+ layers. The client wants me to export each individual layer as an individual SHP file, and needs me to run the export every couple of months. I can write up a script file specifying each layer etc, the catch is that I also need to export the Attribute Data from the attached data tables for each item. I cannot seem to get a hook into the Attribute Data using the MAPEXPORT command in a script, e,g: -mapexport" "SHP" "c:\\Temp\\MyLayer1.shp" "Y" "c:\\Temp\\Street.epf" "S" "L" "All" "MYLAYER1" "*" "No" "Proceed" -mapexport" "SHP" "c:\\Temp\\MyLayer2.shp" "Y" "c:\\Temp\\Street.epf" "S" "L" "All" "MYLAYER2" "*" "No" "Proceed" This will export my layers, but minus the Attribute Data from the attribute table. Does anyone have experience in doing this kind of export to SHP? Is it possible to script, or code so that the shapefile contains the Attribute Data? I tried something along the lines of: -mapexport" "SHP" "c:\\Temp\\MyLayer2.shp" "Y" "c:\\Temp\\Street.epf" "S" "L" "All" "MYLAYER2" "*" "No" "D" "MyDataTable" "Proceed" But this was just a stab in the dark, I cannot find any documentation outlining the datatable in the command line use of MAPEXPORT. Note: I can export the shapefile manually and select the data table and it exports as I need it to (by selecting the Data tab in the export dialogue). I have very limited knowledge of Lisp. I hope I have explained my issue well enough. Thanks for any help.
  2. 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
  3. Hello, I'm searching to make a LISP, to change the layer of an attribute. Actually it in "TopoAlt" Layer, I like to change in "0" layer (or other) I thinked about DXF code but i don't find it with dumpallproperties. "Battman" command would be a good solution but I can't make script "-eattedit" command is pretty close but I'm stopped when It need " attribute selection". If i could scripting "-eattedit" with an automatic attribute selection (like an already made SSGET), I could change the layer, or other properties ! Any Idea ?
  4. i have so many block attribute in my drawing, when i selection attribute and use attout. the result from txt file the list become not sequential. for example : I want the order to remain the same
  5. 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.
  6. Hi, I am a beginner with AutoLISP. I have adapted a program found within this forum that adds attributes to an already existing block within a drawing. I have been able to change the font to ARIAL, but I would also like to make it BOLD, how can this be done? (vlax-put AttObj 'Alignment acAlignmentleft) ;; 4 (vlax-put AttObj 'StyleName "Arial") Is there a simple vlax-put command that can set BOLD to true? Thanks
  7. TL;DR I need to connect blocks using attribute values. I created multiple blocks and attribute with different properties (Annotative, scaled attribute text to 1:50, Upside down, Backward, Invisible, Constant, Verify, Preset, Multiple lines, Lock position, Visibility parameters) Request 1: I need to request for help to create a lisp for connect with *lines between attribute definition values since their attribute insertion point or block insertion point, ignoring all properties, included caps, but Visibility parameters not should be ignored, all this just of selected blocks (dynamic blocks, regular blocks, nested blocks). (check dwg attached for more details) Request 2: Add an option for let me choice if I need to ignore just specific attributes tag. (in the attached drawing I ignored between attributes values “tipo” and “nivel”) Request 2: Add an option for let me choice if I need connect just specific attributes tag. (in the attached drawing I connected between attributes values “codigo” and “alimentador”) Request 3: Add an option for let me choice for connect blocks insert point or attribute definitions insert point (check dwg file and images for more details) PD: attached blocks with the name “connect attributes.dwg” PD: if possible use DCL or OpenDCL for the GUI. connect attributes.dwg
  8. 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!
  9. 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!
  10. 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
  11. 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?
  12. 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
  13. 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.
  14. 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.
  15. 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
  16. 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...
  17. 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!
  18. 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.
  19. 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.
  20. 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
  21. 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
  22. 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
  23. 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
  24. 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!
  25. 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
  • Create New...