Jump to content

Search the Community

Showing results for tags 'block 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...

Found 17 results

  1. Hello, can anyone help me please with this topic? I have 9 layouts. I've inserted the same block to each layout. I want to change some attributes (the title of the drawing inside block) for each layout out of those 9. The Layout name is variable according to the number of project which I have at that moment (SCH 23-123_01 or SCH 23-125_01 for example), but the attribute values are always the same (for example "1 floor" for layout 1, and "section A-A" for layout 2 etc.) I'm newbie in AutoCAD LISP files, so I've tried something with ChatGPT, but it doesn't seems to work. (defun c:Updateattributes () ;; Define your block name and attribute tag (setq blockName "Pečat Marko Vukićević") (setq attributeTag "NAZIV CRTEŽA") ;; Define a list of attribute values corresponding to each layout (setq attributeValuesList '("OSNOVA JAME" "PRESECI VOZNOG OKNA" "OSNOVA VRHA VOZNOG OKNA I DETALJ MONTAŽNE KUKE" "DETALJ PRAGA VRATA" "TEHNIČKE SPECIFIKACIJE" "OSNOVA KABINE" "PRESECI OPREME I RASPORED KONZOLA" "PREGLED SIGURNOSNIH PROSTORA" "POGLED PRISTUPNIH STRANA")) ;; Start iterating through layouts (vlax-for (layout (vla-get-Layouts (vla-get-ActiveDocument (vlax-get-acad-object)))) (vla-activate layout) ;; Check if the block exists in the layout (if (tblsearch "Pečat Marko Vukićević" blockName) ;; If the block exists, update the attribute value (progn (vla-get-active (setq pspace (vla-get-ModelSpace layout))) (vlax-for obj (vla-get-Block pspace) (if (= blockName (vla-get-Name obj)) (progn ;; Find the attribute reference (vlax-for attrRef (vlax-invoke obj 'GetAttributes)) (if (= attributeTag (vla-get-TagString attrRef)) ;; Update the attribute value from the list (vla-put-TextString attrRef (pop attributeValuesList)) ) ) ) ) ) ) ) (princ "\nAttribute values updated for all layouts.") (princ) ) I've asked Chat GPT also if special characters like "č" "ć" "š" "ž" is possible to have in LISP, and I've got the positive answer, but I'm not sure that is true. Can someone please verify me this information as well? If someone has slightest idea in which direction I should go, It would mean a lot to me. Thanks in advance! P.S. In the attached file there is a sample of my drawings. Also I would like to rename another attribute inside block to be the same as the layout name, but that is on another level. Demo.dwg
  2. Hi, I want a LISP routine which can insert blocks along the polyline. I have two dynamic blocks. They are 'Straight Duct' and 'Elbow90'. Consider I draw a polyline with three XY coordinates i.e. (1,1) , (1,2) and (2,2) and insert rectangular block with desired 'Width'. Here are list of things I want from LISP program: 1. I want 'Straight Duct' to be inserted at mid-points of '(1,1) & (1,2)' and '(1,2) & (2,2)'. 2. Also, those inserted blocks should be rotated with an angle made by those points with horizontal so that 'Straight Duct' remains along the line. Example, Angle made by line joining points '(1,1) & (1,2)' with horizontal is 90 Deg. Hence, Dynamic Block should be rotated by 90 degree about midpoint. 3. Move the grip of 'Straight Duct' (which facing to open end of polyline) to the open end of polyline. Move other grip of 'Straight Duct' to the length of (150+ Width/2) mm less than the intersection point. 4. Insert 'Elbow90' at the point with polar angle 45 Degree to point of intersection and polar radius (150 + Width/2) mm. Also, the grip of elbow should be moved so that width of 'Elbow90' should be as same as that of 'Straight Duct'. Pls refer the attached file for understanding the problem. Can anyone help me out? HVAC Dynamic Blocks 24.04.2018.dwg
  3. I made a Block Library with 4 objects in it, which I proceeded to insert into a drawing. However, only 2/4 of the objects inserted. The layers are not frozen, locked, or invisible. I've attached two screenshots. Please help me! I've been messing with this for hours.
  4. Hello, I want to be able to Explode (or BURST) the Block. And for the Block Attribute 'CAB_ID' to copy through to the Object Data Field 'CAB_ID' on the Polyline. I used a program called POWER MAP, which was alright but still long winded, and a program called GeoTools, which is very powerful, but not quite what is needed. Im sure this would be relatively simple for a Pro user. Any help much appreciated. BLOCK ATTRIBUTE TO POLYLINE OBJECT DATA.dwg
  5. Hello, I am looking for a lisp the can place a block along a polyline every 500 feet. I know about using the measure command, and have made a lisp to use it, but one of the blocks that I have to use has an attribute. Measure does not work with attributed blocks. Is there already a lisp out there that will work like measure with attributes blocks or does anyone have any ideas that could do this?
  6. 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
  7. Hello, I have created a palette with several predefined blocks. However, I would like to use the same block for several icons, by filling in specif attributes with different values. Eg: Palette Icon1-> BlockName: Block X, Attribute1: A Icon2-> BlockName: Block X, Attribute1: B Icon3-> BlockName: Block X, Attribute1: C By having a look at the .xtp file I see the following tags regarding each icon of the palette: I would like to know how can I set the Attribute1 value within the xtp file for each icon. Thanks in advance! Cheers
  8. Hi All, I hope i have put this in the right section of the forum. Introduction to my Queries: I am working on a 2D housing layout, which has multiple houses, roads, paths and trees, ect. For the record I use Blocks for the houses and within each block contains details such as House Name, Engineering Details (Rain water Pipe, Soil Vent pipe), Hatch Colour, roof line and entrance indication. The problem: Quite often I will have to mirror and rotate the houses to give variation for the elevations and general design of the layout. Now the problem I have, is when using the mirror cmd. The mirror cmd also mirrors the text which mean I have the choice of 2 things: A- explode the house block and flip the text back. B- make an additional mirrored blocks for each orientation. the problem with solution B is i have to then insert a new block each time, which makes the Job very long winded and lengthy especially if i have say 1000 houses on the scheme. is there a way to have a block which allows you to replace it on the whim? Like a right click change to opposite block. or is there a way to make the text to always keep it orientation? despite being mirrored Thanks in advance Jason
  9. Hi, I'm working on a project in which we have a large volume of drawings, there's information in the title block that is required to be changed on regular basis. Would anyone know if there is a quick method to doing this. I've tried a few things I've found on other forums but they didn't work. Could be me screwing it up or the information could be not compatible with newer version, the version of Autocad I'm using is AutoCAD LT 2014. Thanks
  10. Hi I'm new to the site so I'll try and be as clear as possible! I am creating a new title block for my office. In the new block I am using fields to limit the amount we have to fill it out. This has worked well with the exception of getting the viewport scale to work properly. I have visited just about every forum on the internet to see how to make this work and all i can discover is that I don't appear to be doing anything wrong. So my question is this. I am using a field in a title block that links to a viewport to give its custom scale value. ie the viewport is set at 1:100 then in the title block says that the scale shown in the drawing is 1:100. If I have to change the scale in the viewport to 1:50 then i can regen my layout and my title block will now say that the scale shown in the drawing is 1:50. Like Magic!! However this is not working for the scales 1:5, 1:25 & 1:200. Instead of the scale the field in the block just says "CUSTOM". Does anyone know why and how i can fix this? It makes no sense to me and works with all the other scales that we use. Thanks in advance
  11. 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
  12. 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
  13. 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.
  14. Dear Lisp Masters, I need help to do this: 1 - Insert a Multileader with a user defined block - OK, no problem. 2 - Pick to place block - OK, no problem. 3 - Pick to place arrow - OK, no problem. So far so good, then a lisp capable of: 4 - Pick to select a polyline. 5 - Collect some info from polyline such as width, lenght, layer, vertices coodinates (x,y,z) etc. 6 - Pick to select a Multileader 7 - Insert the collected info into the block attributes values. It's possible to do that? Greetings from Portugal!!!
  15. Hello Im looking for some LIPS wchich help me makre make drawing descriptions. For example : in may drawing a have few blocks and I want to copy theirs parameters to descriptions block How to copy attributes between blocks
  16. Hello PPL I need to optimize my work and i have a lot of blocks to count so i decided to give lisp a try (i am a nneewwwbbiieee). How can i select "blocks made of attribute entities" or "plain attributes entities"? Real life example: 1) prompt the user to give a name and a number ( name of entity/block and a number ) 2) by using what the user prompt I wanna it to select a set of blocks or entities ( the best solution you consider ) that match: a) Tag ( name) b) value ( number) sorry for my english, am i making any sense at all??? regards
  17. Hi all, I am trying to extract data from a block for eg. area of a polyline (that had been made as a block) so that I can export it as an excel schedule. I have been unsuccessful so far. Whenever the data extraction window asked for what kind of information to be extracted, area is not one of them. Another question is, I have information that had been worked out in excel and I want to attach this to the blocks that i have made in CAD. I have import the schedule into CAD and this comes in as a table. How do I then link the cells in the table to the block annotation so that when the excel schedule changes, the block annotation changes too? Thank you!!! Would really appreciate some help! Elfie:)
×
×
  • Create New...