How do I programmatically determine if a layer is versioned?

2685
3
Jump to solution
11-01-2012 11:04 AM
GenaroGarcia
New Contributor III
I need to determine if a layer is versioned or not programmatically.
Based on that, I need to set the editing option, "Edit a version of the database with the ability to undo or redo." to true (checked) or false (unchecked).

Is there a way to do this?

Any help is greatly appreciated.
0 Kudos
1 Solution

Accepted Solutions
by Anonymous User
Not applicable
Original User: sean_jones

Yes, use IEditProperties3.MultiuserEditSessionMode to switch  between versioned and non-versioned editing. This is the property behind that checkbox. This can only be set outside an edit session.

View solution in original post

0 Kudos
3 Replies
by Anonymous User
Not applicable
Original User: sean_jones

Genaro,

You can tell if an object is registered as version by using the members on IVersionedObject3
Also see this thread: : How to tell if feature class is registered with Move Edits To Base

You can set the versioning options (Editor options versioning tab) via the members on IEditProperties3
0 Kudos
GenaroGarcia
New Contributor III
Yes, that's what I needed to determine if the editing feature class is versioned or not.

Based on that, is there a way to set the edit session to versioned or not versioned.
I'm switching between layers, one versioned and the other is not.
0 Kudos
by Anonymous User
Not applicable
Original User: sean_jones

Yes, use IEditProperties3.MultiuserEditSessionMode to switch  between versioned and non-versioned editing. This is the property behind that checkbox. This can only be set outside an edit session.
0 Kudos