supressing auto regeneration via vba

supressing auto regeneration via vba

Anonymous
Not applicable
534 Views
2 Replies
Message 1 of 3

supressing auto regeneration via vba

Anonymous
Not applicable
I have written a vba routine to create a series of points in a drawing based
on information in a database. I would like to be able to regenerate at
certain points in the routine (when a layer is complete, for example). My
problem is that the drawing automatically regenerates everytime a point is
added. Ultimately this routine will be drawing >1 000 000 points, at which
point the time loss from regeneration after every point is added will be too
high.

I have tried turning autoregeneration off at the acad command line before
running the routine, but this hasn't worked. Is there a way to control
drawing regeneration from the vba routine?

Thank you.

Ursula Dillon
0 Likes
535 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable
Ursula,

Have you tried ThisDrawing.SetVariable "regenmode", 0 ?

Gary

> I have tried turning autoregeneration off at the acad command line before
> running the routine, but this hasn't worked. Is there a way to control
> drawing regeneration from the vba routine?
0 Likes
Message 3 of 3

Anonymous
Not applicable
Thanks. That does work for turning the regeneration off, although it didn't
go to the source of my troubles. For some reason I decided that defining
the point style inside the loop was a good idea. Oops! Took that out and now
everything is running smoothly.

Ursula

> Ursula,
>
> Have you tried ThisDrawing.SetVariable "regenmode", 0 ?
>
> Gary
>
> > I have tried turning autoregeneration off at the acad command line
before
> > running the routine, but this hasn't worked. Is there a way to control
> > drawing regeneration from the vba routine?
0 Likes