You can set the active tool using bpy.ops.wm.tool_set_by_id(name = "builtin.cursor") and use ToolSelectPanelHelper class to get a reference to it. Code based on Operator Simple template:
import bpy
from bl_ui.space_toolsystem_common import ToolSelectPanelHelper
class SimpleOperator(bpy.types.Operator):
"""Tooltip"""
bl_idname = "object.simple_operator"
bl_label = "Simple Object Operator"
def execute(self, context):
# Set the cursor tool
bpy.ops.wm.tool_set_by_id(name = "builtin.cursor")
# Get the tool
tool = ToolSelectPanelHelper.tool_active_from_context(context)
# Set the properties
props = tool.operator_properties('view3d.cursor3d')
props.use_depth = False
props.orientation = 'GEOM'
# Print all properties
print (dir(props))
# [..., '__slots__', 'bl_rna', 'orientation', 'rna_type', 'use_depth']
return {'FINISHED'}
addon_keymaps = []
def register():
bpy.utils.register_class(SimpleOperator)
# Add a shortcut
wm = bpy.context.window_manager
kc = wm.keyconfigs.addon
if kc:
km = wm.keyconfigs.addon.keymaps.new(name='3D View', space_type='VIEW_3D')
kmi = km.keymap_items.new(
SimpleOperator.bl_idname, type='C', value='PRESS', ctrl=True, shift=True)
addon_keymaps.append((km, kmi))
def unregister():
bpy.utils.unregister_class(SimpleOperator)
# Remove the shortcut
for km, kmi in addon_keymaps:
km.keymap_items.remove(kmi)
addon_keymaps.clear()
if __name__ == "__main__":
register()
Just run the script (or install as add-on) and press CtrlShiftC to enable the Cursor Tool along with your custom properties (use_depth, orientation in this case).