See the top rated post in this thread. Click here

Page 1 of 2 12 LastLast
Results 1 to 10 of 19

Thread: Startup Switches

  1. #1
    I could stop if I wanted to
    Join Date
    2006-03
    Location
    San Cristobal, Guatemal
    Posts
    439
    Login to Give a bone
    0

    Default Startup Switches

    I have a startup switch to open out template (DWT), this works fine. I am looking for a switch that will ask the user to "save drawing as" a project as soon as it opens. Anyone know what to use for the switch? Please advise, Thanks.

  2. #2
    Certified AUGI Addict cadtag's Avatar
    Join Date
    2000-12
    Location
    Cairo - no, not Illinois
    Posts
    5,069
    Login to Give a bone
    0

    Default Re: Startup Switches

    If a statup switch is required, then /s to run a script that has one line in it,
    SAVEAS

    otherwise, it would make more sense to me to put a call in acaddoc.lsp to see if the drawing is named, and if not named, run SAVEAS, else do nothing.

  3. #3
    Administrator BlackBox's Avatar
    Join Date
    2009-11
    Posts
    5,719
    Login to Give a bone
    0

    Default Re: Startup Switches

    In this situation, I'd suggest you go with the Script route via /b switch, as this is executed last in the startup sequence... Calling this SaveAs Command via AcadDoc.lsp (while possible) may be problematic given there are other processes still taking place/loading... Won't know of limitations for sure until this is tested.
    "How we think determines what we do, and what we do determines what we get."

    Sincpac C3D ~ Autodesk Exchange Apps

    Computer Specs:
    Dell Precision 3660, Core i9-12900K 5.2GHz, 64GB DDR5 RAM, PCIe 4.0 M.2 SSD (RAID 0), 16GB NVIDIA RTX A4000

  4. #4
    Certified AUGI Addict cadtag's Avatar
    Join Date
    2000-12
    Location
    Cairo - no, not Illinois
    Posts
    5,069
    Login to Give a bone
    0

    Default Re: Startup Switches

    good catch, it's the /b that calls a script, not /s -- here I was getting lazy and not checking.....

    If you choose to run a script rather than working with acaddoc.lsp, you'll still need to check if the drawing has been named. It's quite feasible to start Acad by dragging a dwg file onto the desktop icon, and that's at least one case where you would not want to blindkly force a SaveAs.

    I think then, that the simplest script would be (if (=(getvar "dwgtitled") 0)(command ".saveas" "" "~"))

  5. #5
    Administrator BlackBox's Avatar
    Join Date
    2009-11
    Posts
    5,719
    Login to Give a bone
    0

    Default Re: Startup Switches

    No worries; More on Startup Switches

    ... Note the update following 2013 SP1.1, and be sure to check for potential changes following the release of 2014 (and the myriad of hotfixes, and updates that ensue).
    "How we think determines what we do, and what we do determines what we get."

    Sincpac C3D ~ Autodesk Exchange Apps

    Computer Specs:
    Dell Precision 3660, Core i9-12900K 5.2GHz, 64GB DDR5 RAM, PCIe 4.0 M.2 SSD (RAID 0), 16GB NVIDIA RTX A4000

  6. #6
    I could stop if I wanted to
    Join Date
    2006-03
    Location
    San Cristobal, Guatemal
    Posts
    439
    Login to Give a bone
    0

    Default Re: Startup Switches

    Quote Originally Posted by cadtag View Post
    I think then, that the simplest script would be (if (=(getvar "dwgtitled") 0)(command ".saveas" "" "~"))
    How and where do I add the script after I place the switch?

  7. #7
    Administrator BlackBox's Avatar
    Join Date
    2009-11
    Posts
    5,719
    Login to Give a bone
    0

    Default Re: Startup Switches

    Quote Originally Posted by Darren Allen View Post
    How and where do I add the script after I place the switch?
    ... In the Script file (.scr) your /b switch specifies.

    Pseudo application icon Target Property:

    Code:
    "YourFilePath\acad.exe" /p "YourProfile" /t "YourFilePath\YourFileName.dwt" /b "YourFilePath\YourFileName.scr"
    "How we think determines what we do, and what we do determines what we get."

    Sincpac C3D ~ Autodesk Exchange Apps

    Computer Specs:
    Dell Precision 3660, Core i9-12900K 5.2GHz, 64GB DDR5 RAM, PCIe 4.0 M.2 SSD (RAID 0), 16GB NVIDIA RTX A4000

  8. #8
    I could stop if I wanted to
    Join Date
    2006-03
    Location
    San Cristobal, Guatemal
    Posts
    439
    Login to Give a bone
    0

    Default Re: Startup Switches

    Quote Originally Posted by BlackBox View Post
    ... In the Script file (.scr) your /b switch specifies.
    Thanks for that, but already I understood that portion. What I need to know is; do I copy and paste the script into note pad and save as a .scr and then save it where?
    Last edited by Darren Allen; 2013-03-12 at 12:29 PM.

  9. #9
    Certified AUGI Addict cadtag's Avatar
    Join Date
    2000-12
    Location
    Cairo - no, not Illinois
    Posts
    5,069
    Login to Give a bone
    0

    Default Re: Startup Switches

    Yes, and save it wherever you want -- just make sure that the path and name of the .scr file is included in your desktop shortcut.

    so, if the script is saved as mystart.scr, and saved in m:\common stuff\files\, then after the /b you would have:
    "M:\COMMON STUFF\FILES\MYSTART.SCR"

  10. #10
    I could stop if I wanted to
    Join Date
    2006-03
    Location
    San Cristobal, Guatemal
    Posts
    439
    Login to Give a bone
    0

    Default Re: Startup Switches

    Quote Originally Posted by cadtag View Post
    that the simplest script would be (if (=(getvar "dwgtitled") 0)(command ".saveas" "" "~"))
    When I use this script as written; I get "Invalid File Name" message. Am I supposed to replace anything in the script?

Page 1 of 2 12 LastLast

Similar Threads

  1. Dynamic Switches
    By Ryder76 in forum Dynamic Blocks - Sharing
    Replies: 10
    Last Post: 2014-04-15, 01:27 PM
  2. How can I make a startUp Exe for Startup AutoCAD
    By 740176597380946 in forum ARX
    Replies: 6
    Last Post: 2013-05-24, 05:36 AM
  3. Switches and Outlets
    By mrdavie in forum Revit Architecture - General
    Replies: 4
    Last Post: 2011-04-08, 11:18 PM
  4. Switches
    By phil.pleiss in forum Revit MEP - General
    Replies: 5
    Last Post: 2008-08-14, 07:45 PM
  5. Setting more than one Path with Startup switches
    By jonathanschade in forum AutoCAD Customization
    Replies: 4
    Last Post: 2007-03-19, 10:27 AM

Posting Permissions

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