Jump to content

Search the Community

Showing results for tags 'block'.

  • 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. Hello, I have been a lurker on these parts for a while, now i need help with a problem of my own. (I use autocad mechanical 2013) I have a cad drawing which contains 1000's of blocks, each with its own part reference within. As we use autodesk Vault and cad's design centre in tandem both the block name and partref description need to match. At present many block do not. What I am investigationg a a lisp type routine which will automatically rename all blocks in a drawing with its part reference description. As I am a novice with lisp I would like the forums help with this. Kind Regards, lladoog
  2. I have two different blocks overlapped on each other which have similar or same geometries. I want to verify the visual difference on both the blocks. I want to verify if the vendor block contains the same geometry as mine. Here is what I'm thinking and Need lisp for: I want to select the first block, deselect it, select the other one, deselect it and then this process should be looped till I can visaully find difference between blocks by select/highlight method without grips. If possible to add timer between selection & deselection process would make things easier and allow zoom and pan while still looping. Can anybody help me please?
  3. I have made a few blocks that contain a few attributes. I have populated the Tag, Prompt, and Value for each block. When I insert the block the value seems to take on a life of its own and populate with text different than what I have entered. Any Ideas?? Block.dwg
  4. Morning again, Is there a lisp or piece of code that would change the contents of a block to Layer 0, so I can set it down in my Layering Standard rather than the standard the block was created in (not by me). Look forward to hearing from you Stenna
  5. I'm creating a block with a block attribute. In the blockeditor I can change the draworder so the attribute is partly under some lines. But the draworder in the blockeditor of the attribute doesn't work in the normal modelspace; the blockattribute is allways on top. Can anyone tell me how to fix this? block.dwg
  6. Elevator Man

    Pull Down in Block Attributes

    Is it possible to make a pull down inside of a attributed block? For example: if I a have engineering code section of a title block and I want to be able to choose from a list of codes: ASME A17.1-2004 ASME A17.1-2007 ASME A17.1-2010 ASME A17.1-2012 Can I set up the block to let me do that?
  7. Hey all, I was wondering if it is possible to use dynamic blocks to stretch a rectangle evenly, using only 1 point? I have attached a PDF of a rectangle with 2 lines coming out of each side (before & after picture). I want to use dynamic blocks to pick a point at the top right of the block, so that when I pull it out, the lines will extend, but stay attached to the rectangle. I also what the rectangle to stay in the center at all times. If you can understand, please help! Is this possible? Block Stretching.pdf
  8. Hi all, I have a dynamic block of some door hinges. Depending on the height of the door, depends on the type & quantity of hinges used. I was wondering if it is possible to have a block that detects height? If I insert the hinge block onto my drawing, and snap the base point of the block to the bottom left of the desired door, stretch the pick point to the top, I would like it to automatically change from 2x small hinges (for doors under 312mm high), to 2x large hinges (for doors under 1000mm), and finally to 3x large hinges (for doors over 1000mm)? I have attached a PDF for visual reference to what I'm talking about. I have no idea on any 'Lisp/VBA/Scripts' in AutoCAD, so any suggestions would be greatly appreciated. Thanks, drafting3. DOORS.pdf
  9. 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
  10. Hi all, I have a dynamic block of some door hinges. Depending on the height of the door, depends on the type & quantity of hinges used. I was wondering if it is possible to have a block that detects height? If I insert the hinge block onto my drawing, and snap the base point of the block to the bottom left of the desired door, stretch the pick point to the top, I would like it to automatically change from 2x small hinges (for doors under 312mm high), to 2x large hinges (for doors under 1000mm), and finally to 3x large hinges (for doors over 1000mm)? I have attached a PDF for visual reference to what I'm talking about. I have no idea on any 'Lisp/VBA/Scripts' in AutoCAD, so any suggestions would be greatly appreciated. Thanks, drafting3. [ATTACH]41844[/ATTACH]
  11. Hi all, I have a dynamic block of some door hinges. Depending on the height of the door, depends on the type & quantity of hinges used. I was wondering if it is possible to have a block that detects height? If I insert the hinge block onto my drawing, and snap the base point of the block to the bottom left of the desired door, stretch the pick point to the top, I would like it to automatically change from 2x small hinges (for doors under 312mm high), to 2x large hinges (for doors under 1000mm), and finally to 3x large hinges (for doors over 1000mm)? I have attached a PDF for visual reference to what I'm talking about. I have no idea on any 'Lisp/VBA/Scripts' in AutoCAD, so any suggestions would be greatly appreciated. Thanks, drafting3.
  12. Hello, My goal is to set up a batch printing on all AutoCAD drawings. Each drawing will have a record similar to this: The PartNo records underlined in red are other drawings that my recursive function will go through. That's why I must access this information. I believe I must access an object named "BLOCKNT" in order to do so but I'm unsure about the syntax. FYI, for some reason, whenever I try to use this code: ApplicationServices.Application.DocumentManager.MdiActiveDocument I get the following error: This is a .exe application and I have read that I cannot use NETLOAD commands in a .exe project? Does this make sense? Thank you! Alex
  13. Hi, I'm trying to delete a unused layer. But when I do that I get the following error (see attachment). I googled a bit and figured out that the LAYDEL command might solve my issue, but as I'm using Autocad 2013, that's not possible, as it doesn't have this command... Any id's how to solve this? The block that causes the error can also be deleted, I tried with the purge command, but must be doing something wrong cause it didn't work. Oh yeah, with regard to the purge command, I see it this way (attachment 2), how can you display it in a window kind of view to get a better overview? Best regards, Vincent
  14. Hi All, What i'm looking to do is block multiple objects by windowing all of them at once and have them save as sepearate blocks and using the label in the middle as the block name. I guess the big question is it even possible to do this? Brian block dwg.dwg
  15. Help anyone? http://www.theswamp.org/index.php?topic=44203.0 Thanks, Reuben Shilling
  16. AutoCAD entity using its handle, and zoom from child to parent block, here i used tag name of child block as "REMARKS" and value inserted Parent block handle from Excel. I found some lisp from internet, but showing error, anyone can correct it..? thanks, (defun LM:vl-GetAttributeValue ( block tag ) (setq tag (strcase tag)) (vl-some (function (lambda ( attrib ) (if (eq tag (strcase (vla-get-Tagstring attrib))) (vla-get-TextString attrib) ) ) ) (vlax-invoke block 'GetAttributes) ) ) (defun c:test ( / ss ) (if (setq ss (ssget "_+.:E:S" '((0 . "INSERT") (66 . 1)))) (princ (LM:vl-GetAttributeValue (vlax-ename->vla-object (ssname ss 0)) (setq ent_handle (setq Mystring "REMARKS")) ) ) ) (command "Zoom" "Object" (handent ent_handle) "") (princ) )
  17. Right now I have 15,000 drawings that use letters instead of symbols, an artifact of a now defunct CAD software that translated the letters into symbols. I'd like to remake this in AutoCAD by inserting blocks at the location of those letters. I cannot find instructions on how to do this anywhere, and I need to add the following things to my code: 1 - Insert a set of blocks from another drawing. 2 - Select a specific letter from text in a specific layer in code 3 - Insert one of the newly inserted blocks at the insertion point of the letter 4 - Delete the character as it is no longer needed (unless it was replaced, then it wouldn't be there anymore) Example: Import set of blocks from template drawing. Select from layer "Curb Valve" the character "R" from a piece of text in the layer (exact match preferred if possible). Replace this symbol with a block named "CurbValve." I know you can get the X,Y of the text letter and manually type that in when you manually insert a block, so if you can detect this somehow and assign it to a variable, then use that variable to use as the insertion point of the block it would work. I just haven't been able to figure out how to do it programmatically. Thank You!
  18. I would like to add a drop down list to a block. I would appreciate any help in getting this set up. Ive done a fair amount of research and it appears that things much more complex can be done but this simple task has me stumped. Background: We use the same block (symbol) to represent several different part numbers, but would like to select from a drop down list the actual part number. For example, a beacon symbol is the same no matter what color the beacon, but i would like to be able to select a grip and choose red, green, blue, yellow, ect. I don't want it to do anything to the block, but rather just store the property that is set by the user. Any help would be greatly appreciated. I'm sure this isn't that hard, but i cannot figure it out. Thanks
  19. Greetings to all. I would like some help in how to create a switch plate dynamic block. I can draw the light switch inside block editor no problem. My Objective: To insert a single light switch plate block into a drawing and have the ability to stretch the block to increase the number of switches from 1 to as many as 10 in a gang style. The light switch box would do a basic stretch, but I just can't figure out how to increase the number of switches as the block increases in width. I hope this makes sense. Thanks
  20. I would like to extract a furniture schedule by using attributed blocks. I would like attributes like Item #, Color, Size, Location, Description, Manufacturer, etc…. The problem with the data extraction system that I am having is that in order for a chair with a tag to be considered the same chair and be counted correctly all the block attributes have to be exactly the same/ match. For example, if I have the same chair (CH-01) but the location of the chair changes, cad treats it as 2 different chairs. Anyone know of a solution to this issue I am having? THANK YOU!
  21. So, to give some background information, I have 0 experience with LISP programming, and am an intern at an engineering company. I really would love to score "brownie points" by automating an extremely boring and time consuming task. I have experience with other languages, and can work off of a good base. So here's what I would like the routine to accomplish: 1.) Figure out the name of the title block (the title block will be in the same location on each and every file) 2.) Use that name to modify 5 attribute values of that block (each title block has the same attribute tags: NAME, DRAWING_NUM, SN, DATE, DESIGNER) 3.) Save in a new location. So, for example, lets say the drawing I want to modify is at the location C:/USER/ME/, and is called drawing1.dwg. Lets say that it's title block is called "blanksheet", the routine then needs to modify the 5 attributes (NAME: DrawingName, DRAWING_NUM: 123456, SN: 000, DATE: 10 10 12, DESIGNER: Me) of the block "blanksheet". Then, after it modifies everything, saves it in the location C:/USER/YOU, and is called drawing2.dwg. I'm not even sure if this is doable within the bounds of AutoLISP, so any feedback is appreciated. Thanks in advance!
  22. Thanks to this forum, I can avoid this particular "quirk." Sorry if it's been posted before. I set out to make several blocks annotative. I would insert one, explode it, and redefine it with "Annotative" turned on. When I finished, the insertion point moved to (0,0) for some reason. In other words, if I inserted the original block at (200,200), I would pick the insertion point at (200,200), but the block would be redefined with the insertion point at (0,0). That meant the block would appear at (400,400). I could subsequently edit the block and move the objects back to (0,0). That's not the point. Someone with a block with an insertion point not at (0,0) would have a serious problem here. I don't know what's going on, I don't care, I suspect Autodesk doesn't care either, but I'm posting it to warn other users. So, if you encounter this quirk yourself, you can edit the block normally, open the properties window while in Block Editor, and toggle the Annotative setting. That's it. See this thread.
  23. 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
  24. Hi. I am new to this forum but not necessarily new to cad. I have been working with dynamic blocks lately and I am fascinated with the tool and its capabilities. However, something that I have not been able to figure out and not sure if its this is doable ----> ???Can you make a dynamic block table driven, say from an excel table??? -For example, lets say you have a dynamic block with parameters/actions set up that allow you to set the width, length, height, distance from edge, # of object arrays, etc. Rather than grabbing each grip and specifying the desired dimension, can you make it so the dynamic block is table driven? such as, where you might have a list of desired dimensions (say in excel) and you want to quickly input them into a table in autocad, so that the dynamic block will adjust to those dimensions???
  25. Hi. I have some blocks (different exit signs) in a drawing. I want to make a table or excel sheet that sums up the number of equal blocks in the drawing. How can i make this? I want to connect this tabel to excel 2010. I use AutoCad LT 2012, can some noe help me?
×
×
  • Create New...