Jump to content

Search the Community

Showing results for tags 'script file'.

  • 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 2 results

  1. Hi, I am have a database containing object information. I am able to write out a script from my database that inserts blocks into Autocad C3D. Here is an example of the script file: osmode 0 -layer Set "2020_DESIGN" ATTREQ 1 ATTDIA 0 -insert "DESIGN" 607476.547,7574318.945,0 1 1 0 GAS GR04L001 10354 Is there a way that I can also insert Object Data (into a data table) using this script when creating the block? I have attached an image showing the structure of the data table that I would like to populate. Thanks in advance Lee
  2. Baber62

    Script file

    Need to create a script file that will run lisp routine below, needs to open *.dwg files in folder one at a time then run the lisp routine, save file, then close file and then open next file in directory. Any assistance greatly appreciated. ; (purge-unreferenced-images) (defun purge-unreferenced-images (/ ss1 ctr id symlst enamelst delent vl_delent ipath iname tmp) (defun remlst (/ tmp1) (setq tmp (length (member (cdr (assoc 340 (entget delent))) enamelst)) ) (repeat (- (length symlst) tmp) (setq tmp1 (cons (car symlst) tmp1)) (setq symlst (cdr symlst)) ) (setq tmp (list (car symlst))) (setq symlst (append (reverse tmp1) (cdr symlst))) ) (defun massoc (key alist / x nlist) (foreach x alist (if (eq key (car x)) (setq nlist (cons (cdr x) nlist)) ) ) (reverse nlist) ) (vl-load-com) (setq ss1 (ssget "x" '((0 . "IMAGE")))) (setq ctr 0) (setq id (dictsearch (namedobjdict) "acad_image_dict")) (setq symlst (massoc 3 id)) (setq enamelst (massoc 350 id)) (if ss1 (progn (while (< ctr (sslength ss1)) (setq delent (ssname ss1 ctr)) (setq vl_delent (vlax-ename->vla-object delent)) (setq ipath (vla-get-ImageFile vl_delent)) (remlst) (setq iname (strcat (vl-filename-base ipath) (vl-filename-extension ipath))) (if (and (not (findfile ipath)) (not (findfile iname)) ) (progn (dictremove (cdr (car id)) (car tmp)) (append tmp symlst) (ssdel delent ss1) (vla-delete vl_delent) ) (progn (setq ctr (1+ ctr)) ) ) ) ) ) (while symlst (dictremove (cdr (car id)) (car symlst)) (setq symlst (cdr symlst)) ) ) (defun c:PUI() (purge-unreferenced-images) (princ) ) (princ)
×
×
  • Create New...