I'm moving our DB driven layer management from VBA to .net and want some advice on the appropriate way to handle this.
In VBA we monitor command events and depending on the command initiated, we access a layers DB and compare the command to a list of command-to-layer pairings and then set the active layer that the eventual object is created onto. Once the command completes properly it reverts back to the previously active layer. Most of the layer operations are invisible to our users, they just know text is always on a certain layer, dimensions, viewports, etc.
Moving to .Net, and reviewing the event handler information, I'm curious when the appropriate time is handle the movement of an object to a managed layer:
1. When the command is initiated?
2. After the object is created and then the layer handled retroactively?
3. other?
The event handler information makes me think that I cant count on operational sequence to do this like before.
Would appreciated any advice you could offer.
Hi,
as far as I understand I would:
- alfred -
Given that most methods place objects on the active layer, I would suggest making the appropriate layer active before the object is added. Makes the operational procedure a little more clear, and avoids having to check to see if the currently active layer is off or locked.