Is it possible to suppress all regens until my VBA program is done running?
Loaded question. What does your app do??? You can set REGENMODE to 0 which turns RegenAuto off but will not stop all regenerations from occuring. Depending upon your app, you may be able to change how it functions to avoid, or limit, regens. For example, I once ran across someone who thought his program had to "see" the drawing area so he had the program keep zooming extents so it wouldn't draw off screen. If you were him, removing all the zoom extents and adding one at the end to display the final drawing would work. -- Mike ___________________________ Mike Tuersley CADalyst's CAD Clinic Rand IMAGINiT Technologies ___________________________ the trick is to realize that there is no spoon...
Have an app that changes to every layout in a drawing and does some stuff. Having to regen all of the layouts slows down the app.
You may want to look into the LAYOUTREGENCTL variable. -- I support two teams: the Red Sox and whoever beats the Yankees. | Have an app that changes to every layout in a drawing and does some stuff. Having to regen all of the layouts slows down the app.
Do you have to switch to each layout? What about accessing the layouts through the Layouts collection? Ben Rand Having to regen all of the layouts slows down the app.
MIke, this "see the drawing area" is interesting. There is a ghosting technique that involves placing a block or element and then immediately passing it to a move last command. It works only when the initial place point is within the screen area. To mask this drawback one can prompt for a point to indicate into which screen the element is to be placed and then use that point at the initial placement point. Would there be a way to use the "place then move" method without having to "see the drawing area"?
I'm not sure I follow you...yes, you can place something in the drawing and move it anywhere without "seeing" the final destination as long as you know the point. Does that answer you're question? -- Mike ___________________________ Mike Tuersley CADalyst's CAD Clinic Rand IMAGINiT Technologies ___________________________ the trick is to realize that there is no spoon...
Having to regen all of the layouts slows down the app. Is it necessary to switch to each layout for what you are doing? I have a routine that modifies attribute values across layouts (title blocks) without changing the active layout.
It seemed like you implied it was not necessary for all applications to function if the screen view was smaller than the total drawing plane. I believe there is an instance where this is not true. This is when one places and then moves something using autocad commands issued by sendcommand. The reason for using that method would be to achieve a feedback ghost effect that is not normally possible in VBA. I just figured I'm missing out on something because as far as I know, there are times when you do have to have a target area visible for things to work right.
Ok, now I understand =) You are correct, you cannot use this with sendcommand which, even if you could, defeats your purpose -- you want the user to see the ghost because *he* is manpulating it. -- Mike ___________________________ Mike Tuersley CADalyst's CAD Clinic Rand IMAGINiT Technologies ___________________________ the trick is to realize that there is no spoon...
You should be able to set the layout without displaying it and change it. Whenever the user eventually goes there, the autoregen will occur, or you can regen all layouts at the end of the app. -- Mike ___________________________ Mike Tuersley CADalyst's CAD Clinic Rand IMAGINiT Technologies ___________________________ the trick is to realize that there is no spoon...
Yes it is necessary because each drawing contains a keyplan view. I am zooming the keyplan to extents, freezing appropriate layers in the view and then locking the view. I do this for each layout in the drawing, for which there are several.
Sooooo.... how do you set the layout *without* displaying it?!? Are you setting it as the 'active' layout? ThisDrawing.ActiveLayout = ThisDrawing.Layouts("Layout1") Or is there something I'm missing? (it is only Monday morning after all). -- I support two teams: the Red Sox and whoever beats the Yankees. | You should be able to set the layout without displaying it and change it. | Whenever the user eventually goes there, the autoregen will occur, or you | can regen all layouts at the end of the app. | -- Mike | ___________________________ | Mike Tuersley | CADalyst's CAD Clinic | Rand IMAGINiT Technologies | ___________________________ | the trick is to realize that there is no spoon...
It was Friday =) I meant modify the layout AND was thinking DBX -- Mike ___________________________ Mike Tuersley CADalyst's CAD Clinic Rand IMAGINiT Technologies ___________________________ the trick is to realize that there is no spoon...
I've read through most of the replies and understand what you are trying to do. You have to bring up each layout because you need access to the viewport modelspace on each one. To do something similar, we freeze the layers that are not used in the operation. Regens are much faster and an hour operation becomes a 5 minute operation. I don't know if it will work for your situation, but give it a try. i don't believe that freezing a layer will affect your ability to viewport-freeze it. I hope this helps Tom Austin Stine Consulting