| Author |
Message |
Marc'Antonio Alessi
Guest
|
Posted:
Tue Mar 29, 2005 10:38 pm Post subject:
Re: SDI Problem |
|
|
If you have many files to compute with the script
the performance is VERY different...
--
Marc'Antonio Alessi
http://xoomer.virgilio.it/alessi
(strcat "NOT a " (substr (ver) 8 4) " guru.")
--
|
|
| Back to top |
|
 |
jlspartz
Guest
|
Posted:
Tue Mar 29, 2005 10:58 pm Post subject:
Re: SDI Problem |
|
|
I wouldn't want to close my drawings either. Why is anyone working with SDI on? It doesn't really speed anything up, it just uses less memory with less drawings open. In batch scripts, I still leave SDI off and just put a _CLOSE at the end, so there is still only one drawing open all the time.
But if you must, then use the if statement that ECCAD wrote up above and eliminate the use of two scripts and make it one. |
|
| Back to top |
|
 |
Marc'Antonio Alessi
Guest
|
Posted:
Wed Mar 30, 2005 10:15 pm Post subject:
Re: SDI Problem |
|
|
clip
| Quote: | Why is anyone working with SDI on?
It doesn't really speed anything up,
it just uses less memory with less drawings open.
clip |
hummm...
Save a drawing with name Test and try to run the scripts below,
my tests with one dwg opened are:
SDI=1 SDI=0
---------------------------------
- empty DWG > 6 sec. 24 sec.
- 600Kb DWG > 16 sec. 38 sec.
---------------------------------
If you have thousand files (middly less 1 Mb)
maybe the time is very different.
Greater is the file and smaller is the difference.
--
Marc'Antonio Alessi
http://xoomer.virgilio.it/alessi
(strcat "NOT a " (substr (ver) 8 4) " guru.")
--
Test0.SCR (SDI = 0)
-------------------------------------
_OPEN Test.DWG _ZOOM E _QSAVE _CLOSE
_OPEN Test.DWG _ZOOM E _QSAVE _CLOSE
_OPEN Test.DWG _ZOOM E _QSAVE _CLOSE
_OPEN Test.DWG _ZOOM E _QSAVE _CLOSE
_OPEN Test.DWG _ZOOM E _QSAVE _CLOSE
_OPEN Test.DWG _ZOOM E _QSAVE _CLOSE
_OPEN Test.DWG _ZOOM E _QSAVE _CLOSE
_OPEN Test.DWG _ZOOM E _QSAVE _CLOSE
_OPEN Test.DWG _ZOOM E _QSAVE _CLOSE
_OPEN Test.DWG _ZOOM E _QSAVE _CLOSE
_OPEN Test.DWG _ZOOM E _QSAVE _CLOSE
_OPEN Test.DWG _ZOOM E _QSAVE _CLOSE
_OPEN Test.DWG _ZOOM E _QSAVE _CLOSE
_OPEN Test.DWG _ZOOM E _QSAVE _CLOSE
_OPEN Test.DWG _ZOOM E _QSAVE _CLOSE
_OPEN Test.DWG _ZOOM E _QSAVE _CLOSE
_OPEN Test.DWG _ZOOM E _QSAVE _CLOSE
_OPEN Test.DWG _ZOOM E _QSAVE _CLOSE
_OPEN Test.DWG _ZOOM E _QSAVE _CLOSE
_OPEN Test.DWG _ZOOM E _QSAVE _CLOSE
_OPEN Test.DWG _ZOOM E _QSAVE _CLOSE
_OPEN Test.DWG _ZOOM E _QSAVE _CLOSE
_OPEN Test.DWG _ZOOM E _QSAVE _CLOSE
_OPEN Test.DWG _ZOOM E _QSAVE _CLOSE
Test1.SCR (SDI = 1)
-------------------------------------
_OPEN Test.DWG _ZOOM E _QSAVE
_OPEN Test.DWG _ZOOM E _QSAVE
_OPEN Test.DWG _ZOOM E _QSAVE
_OPEN Test.DWG _ZOOM E _QSAVE
_OPEN Test.DWG _ZOOM E _QSAVE
_OPEN Test.DWG _ZOOM E _QSAVE
_OPEN Test.DWG _ZOOM E _QSAVE
_OPEN Test.DWG _ZOOM E _QSAVE
_OPEN Test.DWG _ZOOM E _QSAVE
_OPEN Test.DWG _ZOOM E _QSAVE
_OPEN Test.DWG _ZOOM E _QSAVE
_OPEN Test.DWG _ZOOM E _QSAVE
_OPEN Test.DWG _ZOOM E _QSAVE
_OPEN Test.DWG _ZOOM E _QSAVE
_OPEN Test.DWG _ZOOM E _QSAVE
_OPEN Test.DWG _ZOOM E _QSAVE
_OPEN Test.DWG _ZOOM E _QSAVE
_OPEN Test.DWG _ZOOM E _QSAVE
_OPEN Test.DWG _ZOOM E _QSAVE
_OPEN Test.DWG _ZOOM E _QSAVE
_OPEN Test.DWG _ZOOM E _QSAVE
_OPEN Test.DWG _ZOOM E _QSAVE
_OPEN Test.DWG _ZOOM E _QSAVE
_OPEN Test.DWG _ZOOM E _QSAVE
|
|
| Back to top |
|
 |
justindavidwerner
Guest
|
Posted:
Thu Mar 31, 2005 12:36 am Post subject:
Re: SDI Problem |
|
|
This doesn't work and neither does:
(if (= dbmod 0)
(command "_new" "D-JOBNO-0G1.1.DWT")
(command "_new" "Y" "D-JOBNO-0G1.1.DWT")
)
although it should. I can't see any reason why is doesn't. |
|
| Back to top |
|
 |
justindavidwerner
Guest
|
Posted:
Thu Mar 31, 2005 12:39 am Post subject:
Re: SDI Problem |
|
|
| Apparently you've never had multiple drawings open without having saved more than one. If/when AutoCAD chooses to crash you don't have to recover just one file but all of them. If you have SDI set to 1 you can open many drawings in many different sessions and if AutoCAD chooses to crash you only have to recover one file. |
|
| Back to top |
|
 |
justindavidwerner
Guest
|
Posted:
Thu Mar 31, 2005 12:43 am Post subject:
Re: SDI Problem |
|
|
| These aren't drawing template so to speak, they are more like a way to start creating a general sheet (cover sheets and ADA sheets). We have a G1 for Dsize, a G2 for Dsize, a G1 for Esize, and a G2 for Esize. The problem is my co-workers don't always erase the Esize drawings if their only using Dsize (we copy a drawing setup folder with every folder set up with generic drawings in it to make a new project folder) so the server is getting filled up with unnecessary drawings. So if people have to create the General drawings from the menu they will only make the size they need. Get it? |
|
| Back to top |
|
 |
BillZ
Guest
|
Posted:
Thu Mar 31, 2005 12:51 am Post subject:
Re: SDI Problem |
|
|
This is what I use when sdi = 0.
| Code: | (defun Q_new (/ acad acaddoc newdoc QnewTemplatePath)
(vl-load-com)
(setq acad (vlax-get-acad-object)
)
(setq acadDoc (vlax-get-property acad 'Documents)
)
;;;
(setq QnewTemplatePath "C:\\Documents and Settings\\>user>\\Local Settings\\Application Data\\Autodesk\\AutoCAD 2005\R16.1\\enu\\Template\\acad.dwt")
;;;
(setq newDoc (vlax-invoke-method acadDoc 'Add QnewTemplatePath)
)
(if (/= newDoc nil)
(vlax-invoke-method newDoc 'Activate)
(prompt "\nFailed to create new drawing file.")
)
)
|
You can change the template to suit.
Bill |
|
| Back to top |
|
 |
justindavidwerner
Guest
|
Posted:
Thu Mar 31, 2005 1:20 am Post subject:
Re: SDI Problem |
|
|
it does work, it just had the same problem as before with the dwgname variable. it needed to be stated like this:
(if (= (getvar "dbmod") 0)
(command "_new" "D-JOBNO-0G1.1.DWT")
(command "_new" "Y" "D-JOBNO-0G1.1.DWT")
) |
|
| Back to top |
|
 |
justindavidwerner
Guest
|
Posted:
Thu Mar 31, 2005 1:23 am Post subject:
Re: SDI Problem |
|
|
Yey!!!!!!!
It works on my computer too and yes I'm the only dinosaur refusing to set SDI to 0.
Again, THANK YOU ALL FOR ALL YOUR HELP, especially you Bob! I hope nothing about this LISP comes up where I need to post here again. |
|
| Back to top |
|
 |
ECCAD
Guest
|
Posted:
Thu Mar 31, 2005 2:35 am Post subject:
Re: SDI Problem |
|
|
You are very welcome.
Yes, at times, filenames are case sensitive.
I thought that would work..
:)
Bob
Http://www.bobscadshop.com |
|
| Back to top |
|
 |
Marc'Antonio Alessi
Guest
|
Posted:
Thu Mar 31, 2005 10:02 am Post subject:
Re: SDI Problem |
|
|
....and if you read my code, if SDI is 0 it set temporarily
SDI 1, when the script is terminated set back SDI 0.
Cheers. |
|
| Back to top |
|
 |
Tom Smith
Guest
|
Posted:
Thu Mar 31, 2005 7:40 pm Post subject:
Re: SDI Problem |
|
|
No, sorry, I don't get it. Apparently I'm missing something. I suppose this method of creating a project evolved for a reason, but I've never seen an approach like that, where unwanted drawing files are created at the outset.
When I've had to do projects with inexperienced help, sometimes I've created a whole folder of nearly empty files just to get them started, but I didn't create files that didn't apply to the job.
I don't see the distinction between a template and "a way to start creating a general sheet" -- that's how I'd define a drawing template. At my present job, we have templates for several purposes, such as a cover sheet template, a general purpose drawing sheet template with title block, and so forth. Most of these are D size since that's what we mostly need, but there's also an E size template. There's also a "blank" template which contains all our layers, linetypes, text styles, etc. but no graphic material. I've also done templates specific to a project, though at this job that hasn't been needed beacuse the project sets are so small.
All the lisps/script/macros posted so far have done what I suggested -- run the NEW command with a designated DWT template file. And all the complexity results from the SDI issue. All I'm suggesting is, instead of creating a menu-driven interface to automate the NEW command with a selected DWT, it would seem simpler to simply run the plain old built-in NEW, and let the user pick the appropriate template from the standard interface. If you make your own template folder and point the path to it, the user won't see anything but the limited range of template choices you give him, and it will work the same regardless of SDI setting, without any programming required. If there's a prompt to save, due to SDI setting, then the user will deal with it. |
|
| Back to top |
|
 |
jlspartz
Guest
|
Posted:
Sat Apr 02, 2005 3:25 am Post subject:
Re: SDI Problem |
|
|
I use docbar, that displays all the drawings that are open and I can right-click and do a save all or close all. If you've worked on 100 million dollar hospital projects that have 300-500 sheets, you'd understand that there is no possible way to work with SDI on.
And then a year ago with Architectural Desktop 3.3, the architectural detailer would not run unless you only had one drawing open. So, if you wanted more than one drawing, you had to open a new session of AutoCAD each time, which took all your available RAM away. So, sorry, I'm quite partial after that to not having SDI on. |
|
| Back to top |
|
 |
|
|
|
|