See the top rated post in this thread. Click here

Page 1 of 8 12345 ... LastLast
Results 1 to 10 of 79

Thread: Scale List Nightmares!!

  1. #1
    Member
    Join Date
    2007-05
    Location
    Mesa, Arizona (For Now)
    Posts
    24
    Login to Give a bone
    0

    Angry Scale List Nightmares!!

    Okay...I finally sat down and wrote the script that our office needed to destroy the hideous scale list nightmare that AutoCAD 2008 creates within itself...what I need is for someone to tell me how to apply this same function into AutoCAD 2008 so that everytime a file is opened it automatically runs this script on the file...we have thousands of files that are accessed every day and sorry to say, I am a bit lazy when it comes to having to run a script everytime I open a file! Do any of you out there in CAD LAND have any ideas?? AutoDesk was helpful in the respect that they suggested writing and running the script...why they can't create a patch for an obvious problem...I don't know!

    Please help...it is killing our network to the point where it is taking 5 minutes or more to open some of these files...files that open in 1 or less with AutoCAD 2007!
    Last edited by rwhitbeck; 2008-01-23 at 11:29 PM.

  2. #2
    All AUGI, all the time CADDmanVA's Avatar
    Join Date
    2006-12
    Location
    New Orleans, LA
    Posts
    881
    Login to Give a bone
    0

    Default Re: Scale List Nightmares!!

    I'm no LISP guru, but what if you added the LISP to the APPLOAD startup suite, then entered the command call for the LISP in the acaddoc.lsp file?

  3. #3
    Certifiable AUGI Addict ccowgill's Avatar
    Join Date
    2004-08
    Location
    Iron Station, NC
    Posts
    3,198
    Login to Give a bone
    1

    Default Re: Scale List Nightmares!!

    Quote Originally Posted by CADDmanVA View Post
    I'm no LISP guru, but what if you added the LISP to the APPLOAD startup suite, then entered the command call for the LISP in the acaddoc.lsp file?
    or you could just add a line to acaddoc.lsp to (load "LisP") (c:lisp) and it would load and run the command. and if you have a common acaddoc.lsp between all your users, you only have to make this one change, dont even have to edit anyone else's machines

  4. #4
    Member
    Join Date
    2007-05
    Location
    Mesa, Arizona (For Now)
    Posts
    24
    Login to Give a bone
    0

    Default Re: Scale List Nightmares!!

    I am not sure how to do that, and I am not sure I would want to mess with that file...I will keep that in mind as a last resort...any other ideas?

  5. #5
    Certifiable AUGI Addict
    Join Date
    2015-11
    Location
    Jo'burg SA
    Posts
    4,512
    Login to Give a bone
    0

    Default Re: Scale List Nightmares!!

    I'm assuming you've created a SCR file. In which case you should find the ACADDOC.LSP file (usually in C:\Documents and Settings\<<User Name>>\Application Data\Autodesk\AutoCAD 2008\R17.1\enu\Support\ - at least in XP). If it doesn't exist create it with a text editor (such as Notepad). This file will be loaded & run for each drawing opened.

    Place the SCR file in a shared directory (e.g. on your server), or create a copy in each user's PC (same folder as above). Add the following code to the ACADDOC.LSP file, assuming the SCR file is called SCALEREM.SCR and placed in a server folder S:\SCRIPTS\:
    Code:
    (setq oldfiledia (getvar "FILEDIA"))  ;Save value of FileDia system variable
    (setvar "FILEDIA" 0)                  ;Set FileDia to 0 to use command prompt only
    (command "_SCRIPT" "S:\\SCRIPTS\\SCALEREM.SCR") ;Run the script
    (setvar "FILEDIA" oldfiledia)         ;Set FileDia back to previous value
    (setq oldfiledia nil)                 ;Clear variable used for FileDia
    If the SCR file is placed in the Application Data folder mentioned above (or any AutoCAD search path) you can omit the path in the (command line in the lisp above, just have the file name.

    BTW, could you share this script here?
    Last edited by irneb; 2008-01-25 at 05:12 AM.

  6. #6
    Member
    Join Date
    2007-05
    Location
    Mesa, Arizona (For Now)
    Posts
    24
    Login to Give a bone
    0

    Default Re: Scale List Nightmares!!

    I was wrong to not trust! I added the ACADDOC.LSP file, which did not exist, to my support folder and it works awesome...exactly what I needed!!

    THANKS TO YOU ALL FOR YOUR HELP AND IDEAS!!

  7. #7
    Administrator rkmcswain's Avatar
    Join Date
    2004-09
    Location
    Earth
    Posts
    9,805
    Login to Give a bone
    0

    Default Re: Scale List Nightmares!!

    Quote Originally Posted by ron.139895
    I was wrong to not trust! I added the ACADDOC.LSP file, which did not exist, to my support folder and it works awesome...exactly what I needed!!
    Correct. "Acaddoc.lsp" is a user maintained file. You create and maintain it. Forget about the "startup suite" - you don't want or need it.

    Back to the main topic.

    We tried resetting the scale list at startup the same way, and immediately started having fatal errors during the ._PUBLISH command. We removed the startup code to reset the scale lists and the fatal errors stopped. I'm not saying that is what caused it for sure, but something to keep in mind.

    BTW: As long as you have SP1 installed, the scale lists will never be imported more than 1 xref level deep. It won't fix already polluted drawings, but it will keep them from getting polluted in the future.
    R.K. McSwain | CAD Panacea |

  8. #8
    Certifiable AUGI Addict
    Join Date
    2015-11
    Location
    Jo'burg SA
    Posts
    4,512
    Login to Give a bone
    0

    Default Re: Scale List Nightmares!!

    Well, depending on your settings, the startup suite may or may not be run for each drawing opened. This setting is in Options --> System --> Load acad.lsp with every drawing. Some turn it off to make AC load a drawing faster - so placing the code in the startup suite may load only for the first drawing opened. If you place it in acaddoc.lsp then you're ensured that it will load for each and every drawing opened.

    So it depends on what type of code you want to have loaded. If the code needs to change each drawing (or check) then place it in ACADDOC.LSP. If it needs to just setvar to global settings or load a new / altered command then Start-up suite. If it's a new / altered command which won't get used as often as say LINE or COPY, then add it as an autoload to acad.lsp.

  9. #9
    Administrator rkmcswain's Avatar
    Join Date
    2004-09
    Location
    Earth
    Posts
    9,805
    Login to Give a bone
    0

    Exclamation Re: Scale List Nightmares!!

    Quote Originally Posted by irneb View Post
    Well, depending on your settings, the startup suite may or may not be run for each drawing opened. This setting is in Options --> System --> Load acad.lsp with every drawing. Some turn it off to make AC load a drawing faster - so placing the code in the startup suite may load only for the first drawing opened. If you place it in acaddoc.lsp then you're ensured that it will load for each and every drawing opened.
    That is partially true. ACADLSPASDOC (the variable controlled by "Options --> System --> Load acad.lsp with every drawing") has no effect on whether lisp files in the startup suite are execute at startup. Regardless of that setting, the files are loaded each time a drawing is loaded.

    Having said that, I would NOT recommend using the startup suite for anything. There is no automatic way to migrate those settings, it's difficult to share the same settings among multiple users, etc.

    There is really no reason to not just use "acad.lsp" and "acaddoc.lsp". (leave ACADLSPASDOC set to 0)
    R.K. McSwain | CAD Panacea |

  10. #10
    Certifiable AUGI Addict
    Join Date
    2015-11
    Location
    Jo'burg SA
    Posts
    4,512
    Login to Give a bone
    0

    Default Re: Scale List Nightmares!!

    Having this type of problem constantly, I've decided to create a LSP with relevant commands to erase incorrect scales from the list & add those used in standard, attached.

    This creates 6 new commands:
    • ScaleListRemXRef - steps through the scale list and deletes each having XREF in the name.
    • ScaleListRemImperial - deletes all containing an equal sign in the name
    • ScaleListRemMetric - deletes all containing a colon in the name
    • ScaleListImperial - install the standard Imperial scales (as per AutoCAD's standards). You may remove / add to these by modifying the StdImplScaleList global variable.
    • ScaleListMetric - does the same, but for metric according to ISO 13567 standard, not the AutoCAD one which shows scales I never use and doesn't show scales which I constantly use. You can edit the StdISOScaleList to your pleasure.
    • ScaleListStandard - runs ScaleListRemXRef, then checks the MEASUREMENT sysvar. If =0 then run ScaleListRemMetric and ScaleListImperial. If =1 then run ScaleListRemImperial and ScaleListMetric. This is probably the only one you'll need.
    I don't like using the reset, since it adds never-used scales as well and removes custom scales. None of these functions will remove custom scales unless you've asked it to, unlike reset. And at least it's customizable, again unlike reset
    Attached Files Attached Files

Page 1 of 8 12345 ... LastLast

Similar Threads

  1. Annotation Scale Nightmares Part 3
    By CadDog in forum AutoCAD General
    Replies: 6
    Last Post: 2009-01-30, 03:54 PM
  2. Annotation Scale Nightmares Part 2
    By CadDog in forum AutoLISP
    Replies: 3
    Last Post: 2008-11-25, 06:33 PM
  3. Civil 3D Scale List Nightmares!!
    By CadDog in forum AutoLISP
    Replies: 10
    Last Post: 2008-07-22, 10:48 PM
  4. Annotation Scale list keeps propagating the whole list
    By jacep in forum AutoCAD Annotation
    Replies: 16
    Last Post: 2007-12-13, 06:24 PM
  5. AutoCAD 2008 Delete scale from Annotation Scale list
    By cgerhardt in forum VBA/COM Interop
    Replies: 3
    Last Post: 2007-04-25, 02:21 PM

Posting Permissions

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