Get value from a bpy.types.Scene property

I have a few properties created like:

bpy.types.Scene.myprop = bpy.props.IntProperty(name="Myprop",default=1)


I want to save their values to a text file but don't know how to extract the actual value (saving just myprop saves all object data instead of just the int value). How to get the actual value?

You can access using bpy.context.scene likes this: print(bpy.context.scene.myprop) or set it equal to a variable: value = bpy.context.scene.myprop, also in your post, make sure you have IntProperty not InProperty like you currently have.
• Yep, using bpy.context.scene instead of bpy.types.Scene did the trick for me. Thx! – Val Oct 23 '14 at 13:23