Jump to content

Search the Community

Showing results for tags 'attribute'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • 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

Categories

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

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

  1. 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.
  2. 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
  3. 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!
  4. 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.
  5. 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.
  6. 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
  7. 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
  8. 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
  9. 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
  10. 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!
  11. 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
  12. 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.
  13. 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
  14. 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
  15. I am trying to write an autolisp program to insert a row of 20 blocks in a drawing, (one over the other), then insert attributes for each from a row in an Excel file. I am using Jeffrey Sanders' "GetCells" function. The Excel file is "RO-16.xlsx" Here's what I have done so far: (defun Addenters ( / cnt yval) (setq cnt 1) (setq yval 0) (setvar "osmode" 0) (load "getcells.lsp") (while ( ( (setq *doc* (vla-get-activedocument (vlax-get-acad-object))) (command "insert" "C:\\07509\\BD" (strcat "0," (itoa yval))"1" "1" "04" (getCellsFunction "C:\\07509\\RO-16.xlsx" "ALLOCATED" "K2") ) (setq cnt (1+ cnt)) (setq yval (+ 8 yval)) ) ) ) So the first attribute, "PLC" is read from cell K2 in the Excel file. There are 7 attributes altogether. Is there a more compact way to do this (with a list or array). I want to avoid having a long line (which is answering to the Autocad prompt for block attributes) which looks like: (getCellsFunction "C:\\07509\\RO-16.xlsx" "ALLOCATED" "L2"), (getCellsFunction "C:\\07509\\RO-16.xlsx" "ALLOCATED" "M2") and so on.
  16. AutoCAD 2012 - 2D I'm trying to create an Annotative Dynamic Block (flip action) that contains a single attribute and some geometry.. The attribute is a "multi-line" attribute so it will change justification correctly when flipped. At the moment I would prefer a "single-line" attribute cause it's faster to fill in your data. BUT - the multi-line attribute also has it's benefits, so I'll keep it for now. The block work's just fine until you decide to change the annotative scale in model space. Please check out the attached file. Try this: 1: Flip the block that's already inserted into the drawing a few times - All is well. 2: Change the annotative scale in model space and try flipping it again - Nothing is well.. 3: Try inserting a copy of the block (insert block and choose "test" from the drop down menu) into the drawing and flip it - All is well. 4: Repeat step "2"... What am I doing wrong?? I can't figure it out.. Any help will be greatly appreciated. Kind regards Blank.dwg
  17. I use Dynamic Block and insert attribute field for value - placeholder - name. here is a print screen - http://joxi.ru/l2ZYpRXU88VExm If i attache the file from a reference in another file, this bloc shows the block name and file name in attribute value. view here - http://joxi.ru/zANBvYdfllwBkA How can i remove name file "Semnalizare" from this attribute value? Thanks.
  18. Hi, Does anyone know how I can create a dynamic block with an editable attribute that has the option to mask objects? I have a very simple block, it's just a triangle with an attribute and I have applied some dynamic rotations to it. It is just used as a length marker for water pipes. I find it odd that there is no option to mask out the background like I can with MTEXT. The only workaround I can think of is to add a true white hatch to the block. Thanks in advance.
  19. Is there any way to update new field attributes in existing blocks already placed in the drawing? I have tried BATTMAN, REFEDIT, ATTSYNC, FIELDEVAL=31... nothing is working. Or will I have to insert all those blocks again? Cause for now that's the only way I can make it work.
  20. Hi there.. im new in the forum and in coding in AutoLisp... so im looking for a form in which i can extract a specific attribute from all blocks that are in a DWG and then this list write it in a txt file
  21. I have hyperlinks to attach with names like 360-001.html or http://www.website.com/360-001. I was wondering if I could get help automating the hyperlinking process for these blocks. So block with attribute "001" would automatically be hyperlinked with http://www.website.com/360-001 when the command is run.
  22. Hi to all, Someone knows a LISP router that can write a selected text on a specific field attribute when you are inserting the block. Eg.: One Block with a field "Diameter", when I'll insert this block I can choose on a window and select what will be that diameter (1/2", 3/4", 1", 1.1/2"), but I have more than one Attribute field to insert (selecting the specific text entry), diameter, length, color... each one with a filed to choose the detail on a list. It looks like a block with a lot of blank attributes that when insert it, for each attribute you need to select on a window that specific detail.
  23. 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.
  24. Hi all, First the details: Autocad 2011, Electrical package, Fairly experienced user with some formal training. I have a problem that seems simple but has me stuck. 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. It would be so much quicker! If any further clarification is necessary, or there is a post that deals with this, by all means just direct me. I have searched the archive but cannot find much that helps me this time. Thanks for your time, Barnaby
  25. I have some dynamic blocks in an old file. I am trying to use the same blocks in another file with some modifications. But when i try to edit it in block, it still remains the same. Can anybody guide how this is possible or what command I should instead of Bedit?
×
×
  • Create New...