Message 1 of 4
no Layer selection troubles

Not applicable
06-08-2006
08:39 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi all,
In my application the user can select an entity and modify some properties via a dialog of mine. Once the dialog is closed i have to refresh my entity. To do so, i use an "easy" way: i delete the old entity and draw a new one. Everything works fine so far.
The problem occurs when i select an entity to change a properties which tell me that i have to draw it in another layer. When i delete my old entity, the selection set is empty of course. At this time the layer control in the toolbar seems to get lost and show me no layer at all (It looks similar when you select a few objects from different layers).
I wouldn't mind this behavior if it was only that. But the real problem occurs when i click on this layer control (to select a layer for instance) and actually do NOT select anything and just click somewhere else. AutoCAD crashes then...
I checked system's variables using sysVarChanged() and find out that CLAYER is not changed. So I tried to manually set a layer after my 'refresh' operation, but i couldn't find a proper solution. I see CLAYER changing, but the layer control in the toolbar still behaves the same way.
I noticed if I select any entities in my drawing after the refresh, then the layer control show the entity's layer and then I can use the layer control as usual without crashes.
I wonder if it's an AutoCAD's issue or maybe something about document's lock.
Any clues about that ?
thanks
In my application the user can select an entity and modify some properties via a dialog of mine. Once the dialog is closed i have to refresh my entity. To do so, i use an "easy" way: i delete the old entity and draw a new one. Everything works fine so far.
The problem occurs when i select an entity to change a properties which tell me that i have to draw it in another layer. When i delete my old entity, the selection set is empty of course. At this time the layer control in the toolbar seems to get lost and show me no layer at all (It looks similar when you select a few objects from different layers).
I wouldn't mind this behavior if it was only that. But the real problem occurs when i click on this layer control (to select a layer for instance) and actually do NOT select anything and just click somewhere else. AutoCAD crashes then...
I checked system's variables using sysVarChanged() and find out that CLAYER is not changed. So I tried to manually set a layer after my 'refresh' operation, but i couldn't find a proper solution. I see CLAYER changing, but the layer control in the toolbar still behaves the same way.
I noticed if I select any entities in my drawing after the refresh, then the layer control show the entity's layer and then I can use the layer control as usual without crashes.
I wonder if it's an AutoCAD's issue or maybe something about document's lock.
Any clues about that ?
thanks