+ Reply to Thread
Results 1 to 10 of 10
  1. #1
    Senior Member gS7's Avatar
    Computer Details
    gS7's Computer Details
    Operating System:
    Windows Xp sp3
    RAM:
    4 GB
    Monitor:
    Viewsonic
    Discipline
    Surveying
    gS7's Discipline Details
    Occupation
    Drafts man / Surveyor
    Discipline
    Surveying
    Using
    AutoCAD 2009
    Join Date
    May 2012
    Location
    Udupi,INDIA
    Posts
    238

    Idea Create Batch file

    Registered forum members do not see this ad.

    Hi,

    Is that Possible to create batch file , when double click the file
    open autocad exe and run lisp file from specified directory ?

    Please reply
    Ganesh Shetty

  2. #2
    Senior Member halam's Avatar
    Using
    AutoCAD 2017
    Join Date
    Jul 2015
    Posts
    495

    Default

    Yes i think this can be done.
    You can have AutoCAD start up with a lisp program.
    In combination with windows scripting.


    But what is the real objective / the tasks that needs to be done, if i may ask?
    Modelling is done with two hands, 2d & 3d. Let it work together..
    https://twitter.com/halammerts

  3. #3
    Senior Member gS7's Avatar
    Computer Details
    gS7's Computer Details
    Operating System:
    Windows Xp sp3
    RAM:
    4 GB
    Monitor:
    Viewsonic
    Discipline
    Surveying
    gS7's Discipline Details
    Occupation
    Drafts man / Surveyor
    Discipline
    Surveying
    Using
    AutoCAD 2009
    Join Date
    May 2012
    Location
    Udupi,INDIA
    Posts
    238

    Default

    Hi halam Thank you for quick reply
    I have created XXX.lsp , XXX.mnu, XXX.mnl and I want to load menu file directly when open AutoCad (for First time only)
    so I asked for .Bat file codes

    and I found a code but its giving error when I run the file

    Code:
      start "t" /w "C:\Program Files\Autodesk\AutoCAD 2014\acad.exe" %%V /b  "D:\1.scr"
    Error : cannot find the Specified Drawing file
    please verify that the file exists
    Ganesh Shetty

  4. #4
    Senior Member halam's Avatar
    Using
    AutoCAD 2017
    Join Date
    Jul 2015
    Posts
    495

    Default

    Sorry, i can't help you tith a fully complete answer, i'm not an 'administrator'
    Bu watch out for the notation of / or // or \ or \\ .. as little help in the direction.






    https://forums.autodesk.com/t5/autoc...e/td-p/2837855


    quote


    Code:
    
    (vl-load-com)
    (setq *files* (vla-get-Files (vla-get-Preferences (vlax-get-acad-object))))
     (vla-put-SupportPath *files* (strcat (vla-get-SupportPath *files*) ";C:\\Lisps\\Steel"))
    ; etc..
    Modelling is done with two hands, 2d & 3d. Let it work together..
    https://twitter.com/halammerts

  5. #5
    Luminous Being
    Using
    Civil 3D 2016
    Join Date
    Dec 2005
    Location
    GEELONG AUSTRALIA
    Posts
    9,036

    Default

    You can load lisps on start up automatically using acaddoc.lsp so could check also for a menu if not loaded, or am I misunderstanding your question.
    A man who never made mistakes never made anything

  6. #6
    Senior Member gS7's Avatar
    Computer Details
    gS7's Computer Details
    Operating System:
    Windows Xp sp3
    RAM:
    4 GB
    Monitor:
    Viewsonic
    Discipline
    Surveying
    gS7's Discipline Details
    Occupation
    Drafts man / Surveyor
    Discipline
    Surveying
    Using
    AutoCAD 2009
    Join Date
    May 2012
    Location
    Udupi,INDIA
    Posts
    238

    Default

    runcad.txtruncad.txt
    Quote Originally Posted by BIGAL View Post
    or am I misunderstanding your question.
    Yes Correct Bigal , I have created a .bat file using this code
    Code:
    "C:\Program Files\Autodesk\AutoCAD 2012\acad.exe" %%V /b "C:\AutoCADscripts\ScriptName.scr"
    when I click the batch file AutoCAD Starts and and load the .scr file
    but it is giving error
    Error : cannot find the Specified Drawing file
    please verify that the file exists

    please help me

    runcad.txt

    Found this code in http://www.cadtutor.net/forum/showth...-to-run-script
    Ganesh Shetty

  7. #7
    Senior Member
    Using
    not applicable
    Join Date
    Jun 2016
    Posts
    391

    Default

    Try removing %%V.
    BricsCAD 16

  8. #8
    Senior Member gS7's Avatar
    Computer Details
    gS7's Computer Details
    Operating System:
    Windows Xp sp3
    RAM:
    4 GB
    Monitor:
    Viewsonic
    Discipline
    Surveying
    gS7's Discipline Details
    Occupation
    Drafts man / Surveyor
    Discipline
    Surveying
    Using
    AutoCAD 2009
    Join Date
    May 2012
    Location
    Udupi,INDIA
    Posts
    238

    Default

    roy_043 thank you it is working now ...and how to load a lisp file from known directory with .scr file
    Ganesh Shetty

  9. #9
    Senior Member
    Using
    not applicable
    Join Date
    Jun 2016
    Posts
    391

    Default

    Code:
    (load "X:/MyPath/MyLisp.lsp")
    BricsCAD 16

  10. #10
    Senior Member gS7's Avatar
    Computer Details
    gS7's Computer Details
    Operating System:
    Windows Xp sp3
    RAM:
    4 GB
    Monitor:
    Viewsonic
    Discipline
    Surveying
    gS7's Discipline Details
    Occupation
    Drafts man / Surveyor
    Discipline
    Surveying
    Using
    AutoCAD 2009
    Join Date
    May 2012
    Location
    Udupi,INDIA
    Posts
    238

    Default

    Registered forum members do not see this ad.

    thank you roy
    Ganesh Shetty

Similar Threads

  1. create batch file to run script ?
    By mostafa badran in forum The CUI, Hatches, Linetypes, Scripts & Macros
    Replies: 23
    Last Post: 8th Jan 2016, 05:38 pm
  2. File Copy Batch
    By suryatry26 in forum The CUI, Hatches, Linetypes, Scripts & Macros
    Replies: 1
    Last Post: 18th Oct 2012, 01:02 pm
  3. Batch file for changing file name
    By XCrossWindsX in forum The CUI, Hatches, Linetypes, Scripts & Macros
    Replies: 5
    Last Post: 1st Jan 2012, 08:07 am
  4. Using Batch Processing to create a *.dwg File List?
    By muck in forum The CUI, Hatches, Linetypes, Scripts & Macros
    Replies: 7
    Last Post: 29th Sep 2010, 06:07 pm
  5. plot to file (as a batch file)
    By tbui63 in forum AutoCAD General
    Replies: 4
    Last Post: 26th Apr 2006, 07:30 pm

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts