db.CurrentSpaceId returned the ObjectID of the ModelSpace and not of the Layout set current. Have anybody seen this happening? Is there something that could prevent this from happening? Thanks for any help.
Thank you Gille I will do that. Are you saying that by setting the CurrentLayout one just sets a Layout current, but that Editor will continue be on ModelSpace, if it was in ModelSpace when the Layout was set current until one calls the SwitchToPaperSpace method? Therefore, db.CurrentSpaceId returns the ObjectId of the ModelSapce.