Jump to content

Search the Community

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

Found 5 results

  1. Hello, I have this code I use to automatically annotate my details (FAS). It takes the block´s name and its description and inputs them into two attributes of the block I use to define a specific Multileader (Smart Multileader). I would like to make it work when selecting nested blocks. I have tried by using nentselp but cannot find the right way. Any help would be really appreciated. Thanks in advance! (defun getDesc (blk / Com) (cond ((not (vl-catch-all-error-p (vl-catch-all-apply (function (lambda ( ) (setq com (vla-get-Comments (vla-item (vla-get-Blocks (vla-get-ActiveDocument (vlax-get-acad-object))) blk)))))))) Com) (t nil))) (defun c:FAS (/ ent entl obj) (cond ((not (setq ent (car (entsel "\nSelect block: "))))) ((not (eq (cdr (assoc 0 (entget ent))) "INSERT")) (princ "\nInvalid object!")) ((setq pt (getpoint "\nSpecify first point: ")) (setq entl (entlast)) (setvar "cmleaderstyle" "Standard") (vl-cmdf "_.mleader" "_non" pt "\\") (while (eq (logand 1 (getvar 'CMDACTIVE)) 1) (vl-cmdf "")) (setq txt (vlax-get-property (setq obj (vlax-ename->vla-object ent)) (if (vlax-property-available-p obj 'EffectiveName) 'EffectiveName ;if obj has EffectiveName. use EffectiveName, else use 'Name 'Name ) ) ) (if (setq desc (getDesc (cdr (assoc 2 (entget ent))))) (setq txt(strcat txt "\n" desc)) ) ;(alert txt) (if (not (equal entl (setq entl (entlast)))) (vla-put-textstring (vlax-ename->vla-object entl) txt) ) ) ) (princ) ) (defun c:FAS (/ ent entl obj) (cond ((not (setq ent (car (entsel "\nSelect block: "))))) ((not (eq (cdr (assoc 0 (entget ent))) "INSERT")) (princ "\nInvalid object!")) ((setq pt1 (getpoint "\nSpecify first point: ")) (setq pt2 (getpoint "\nSpecify second point: ")) (setq entl (entlast)) (setq name (vlax-get-property (setq obj (vlax-ename->vla-object ent)) (if (vlax-property-available-p obj 'EffectiveName) 'EffectiveName ;if obj has EffectiveName. use EffectiveName, else use 'Name 'Name ) ) ) (setq desc (getDesc (cdr (assoc 2 (entget ent))))) (setvar 'attdia 0) (setvar 'attreq 1) (setvar "cmleaderstyle" "Smart Multileader") (command-s "mleader" pt1 pt2 name "" desc "" "" "") ) ) (princ) ) (vl-load-com) (princ) dwg1.dwg
  2. Is there a method to update blocks and nested blocks (dynamic and/or annotated without losing their position, visibility status, and annotated values: Tag/prompt/default values) based on new blocks that will contain in a folder (source files)? New blocks have the same block name as old ones. The cad block files within the "source" folder have the same name as the old block. Dynamic blocks have stretch or rotation properties, example: block is stretched to 2100mm and rotated to 30 degrees. 1) is it possible to obtain this kind of sophistication? 2) How would I run this routine without opening the drawing and that select the drawing files? Thanks
  3. I found a lisp (attached) to change object line type. But this lisp is not changing nested blocks line types and forcing one by one selection . I need to change linetype of all objects include nested blocks and as area selection. Please help ChangeObjLinetype.lsp
  4. I have recently downloads a pile of files, blocks for inserting, symbols. Apparently all files have block in them of the same name of the file name. Thus, upon inserting a file I get the error "block reference itself" and will not insert. Is there a means of removing the block in the file in a batch method? Since there is over 8700 blocks, I do not want to open each file, explode, purge, save, individually. Looking for a batch method that basically does the same thing. Or some other method to not only remove the error, but also to avoid the purging nested block on layer problems.
  5. Hi everyone glad to be in this amazing forum. Straight to the point: is there a way to explode the nested blocks in a drawing that contain a a common word in their name? In our case we have a lot of blocks exported from vectorworks whose name was substitute with -group-xxx-y, is there a way to run a routine similar to exnest but that would explode only the nested blocks with that similar name? Thanks for any help:)
×
×
  • Create New...