Jump to content

Search the Community

Showing results for tags 'open'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • 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


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

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...

Found 15 results

  1. Hi, I need a small lisp that opens and closes a file for me in the background. Nothing needs to be done. In this lisp the file is opened but not closed. (defun c:open_close_explorer () (setq Path "Y:\\Folder\\Data\\Test.txt") (setq File (StartAPP "Explorer.Exe" Path)) (close File) (princ) ) Does anyone have an idea?
  2. Hi, this is my first post on the forum & I'm also pretty new to AutoCAD scripts & Lisp routines, so please bear with me. Basically I have the following script: (setq dn (strcat (getvar "dwgprefix") "New Drawing.dwg")) (vl-propagate 'dn) _.saveas 2010 !dn This script saves my current drawing as 'New Drawing.dwg' within my current directory, and works fine. When I try to modify the script to the following, which attempts to open instead instead of save, it doesn't work, just prompts for drawing name: - (setq dn (strcat (getvar "dwgprefix") "New Drawing.dwg")) (vl-propagate 'dn) _.open !dn The saveas & open dialogues look very similar, so please could someone explain why I can reference a variable for the _.saveas filename, but not for the _.open filename, or have I got the syntax completely wrong for the _.open command?
  3. Hi i want to replace the _open command this works on my old PC but when i go to install on another it just run the default open is there some variable that stops defun from redefining standard autocad commands ; variables set (setq tilemodevar (getvar "tilemode")) (setq varCPROFILE (getvar "CPROFILE")) ; close windows (COMMAND "EXTERNALREFERENCESCLOSE") (COMMAND "LAYERCLOSE") (COMMAND "PROPERTIESCLOSE") (COMMAND "ADCCLOSE") ; Open drawing from vault (if (= varCPROFILE "Vault_r2014_Acad") (progn (defun c:_open () (command "_vltopen" "" ) ;_ end of command );_ end of defun ) ;_ end of progn ) ; autocad variables unset (setvar "FILEDIA" FILEDIAvar)
  4. When I use the open command in Autocad 2013 the following columns are displayed: Name | Date Modified | Type | Size I would like to add Date Created to this dialog so that it appears each time the command is used. I have added it in Windows Explorer and inside the Autocad dialog itself but when I close and relaunch Autocad the "new" column header is gone again. Is this a customizable option so that it remains? Please advise... Thanks!
  5. Hi all, Although vl-file-systime works fine on most files (even readonly ones), it doesn't work on open files. Could any one introduces alternatives to vl-file-systime function to get the time of such files? I appreciate any help and clues to solve the problem
  6. We are working with the new AutoCAD 2014 and have been for some time now. We have just started running into this problem; When we try to open up certain existing drawings instead of opening the actual existing drawing it just opens up a blank "Drawing1". We have tried closing out and reopening cad altogether. Tried shutting down. Tried recovering the drawing. Nothing. The same thing happens. The weird thing is that we could have been in that drawing 2 hours ago while it worked just fine. It does not matter how we open up the drawing, it does this. If someone can chime in quickly I would greatly appreciate it. GOD BLESS!
  7. All, I found this Lisp that Renderman wrote; it works great. I was wondering what do i need to do to it so it continues to open the file even if part of the filename changes ie; the date without changing the code everytime it's updated NEW JOB TEMPLATE-7-8-13 - SMALL.dwg (defun c:OpenMyDwg ( / _OpenDwg ) (defun _OpenDwg (dwg readOnly / f oDwg) ;; RenderMan, CADTutor.net ;; Example: (_OpenDwg "FilePath\\FileName.dwg" T) (vl-load-com) (if (and (setq f (findfile dwg)) (/= 1 (getvar 'sdi))) (vla-activate (vla-open (vla-get-documents (vlax-get-acad-object)) f (cond ((= T readOnly) :vlax-true) ((:vlax-false))))) (cond (f (prompt "\n** Command not available in SDI mode ** ")) ((prompt (strcat "\n** \"" (strcase (vl-filename-base dwg)) "\" cannot be found ** ")))))) (_OpenDwg "F:\\DRAWINGS\\ARCHITECTURAL DETAILS\\NEW JOB\\NEW JOB TEMPLATE-7-8-13 - SMALL.dwg" T) (princ)) Thanks, Brian
  8. khoshravan

    open two files in AutoCAD 2010

    In older versions of AutoCAD it was impossible to open two files simultaneously. I think it was added in later versions. Now I am using AutoCAD 2010 but I don't know if I can open two files and shift between them. If it is possible, how can I do that? As a second question in the same subject, is it possible to copy objects from one file to another?
  9. I am trying to open up a document in a script routine, and I know the beginning of the file name (and it is unique) but when I add a wildcard character, the script throws an error. For example, say the file name is Project_1-title.dwg, I want to be able to open that file with ' open "Project_1*.dwg" ', or even just Project_1*. Is there any way of doing this, or must you know the entire file name in order to open the document? Thanks in advance. -Serabis
  10. Hi all, as you know there is a way to get a list of all opened drawings. (defun Get:OpenDrawings ( / *dwg* *acdocs*) (vlax-for <doc> (MT:vla-get-Documents) (if (eq "" (setq *dwg* (vla-get-fullname <doc>))) (setq *dwg* (vla-get-name <doc>))) (setq *acdocs* (cons (cons (strcase *dwg*) <doc>) *acdocs*)) ) (reverse *acdocs*) ) (Get:OpenDrawings) returns an assoc list of all opened drawings' ((name1 . vla-object1) (name2 . vla-object2) ... (nameN . vla-objectN)) Is there a way to get all opened drawings in current session as ObjectDBX?
  11. Hello i would like to have a script that can be batch-applied to multiple drawings to do the following: -vports,2,v visretain,0 reload all xrefs save and close Can somebody please help me with this Thanks
  12. Hi CADmates, as most of you know, CommandWillStart and CommandEnded are two reactors triggered just when a command called and a command ended. I am looking for a way to control OPEN command after selecting a drawing and before actually OPENing it. Is this mission possible? Any suggestions and help greatly appreciated.
  13. Hi CADmates, how is it possible to recognize an ellipse object is closed (i.e. full ellipse) or open (i.e ellipse arc)? Any reply appreciated.
  14. Hi everyone, how is it possible to find out any drawing is read only due to being opened by other one, without opening it?
  15. Hello CADTutor members, I found a code by Lee Mac to open a folder by AutoLISP here. The code follows: (defun MT-Explore (Directory / Shell result) (setq Shell (vla-getInterfaceObject (vlax-get-acad-object) "Shell.Application" ) ) (setq result (vl-catch-all-apply 'vlax-invoke (list Shell 'Explore Directory)) ) (vlax-release-object Shell) (not (vl-catch-all-error-p result)) ) Should anyone know how to close the opened folder?
  • Create New...