get_handle_objectT_get_handle_objectGetHandleObjectGetHandleObjectget_handle_object (算子)

名称

get_handle_objectT_get_handle_objectGetHandleObjectGetHandleObjectget_handle_object — 从句柄检索与键关联的对象。

签名

get_handle_object( : Object : Handle, Key : )

Herror T_get_handle_object(Hobject* Object, const Htuple Handle, const Htuple Key)

void GetHandleObject(HObject* Object, const HTuple& Handle, const HTuple& Key)

static void HOperatorSet.GetHandleObject(out HObject objectVal, HTuple handle, HTuple key)

def get_handle_object(handle: HHandle, key: Union[str, int]) -> HObject

描述

get_handle_objectget_handle_objectGetHandleObjectGetHandleObjectGetHandleObjectget_handle_object retrieves an iconic object associated with the KeyKeyKeyKeykeykey from HandleHandleHandleHandlehandlehandle and returns it in ObjectObjectObjectObjectobjectValobject. The list of keys supported by a handle can be queried with get_handle_paramget_handle_paramGetHandleParamGetHandleParamGetHandleParamget_handle_param

Note that this operator is provided only for implementing generic debug and inspection mechanisms. The keys returned for certain handle types can change without notice. Additionally, some handle types might not be supported by this operator. Also, this operator is not optimized for performance. To obtain more reliable information about a handle in a program, it is strongly recommended to use the operators specialized for the particular handle type, such as get_object_model_3d_paramsget_object_model_3d_paramsGetObjectModel3dParamsGetObjectModel3dParamsGetObjectModel3dParamsget_object_model_3d_params, get_generic_shape_model_paramget_generic_shape_model_paramGetGenericShapeModelParamGetGenericShapeModelParamGetGenericShapeModelParamget_generic_shape_model_param etc.

执行信息

参数

ObjectObjectObjectObjectobjectValobject (输出对象)  object(-array) objectHObjectHObjectHObjectHobject *

Iconic value of the key.

HandleHandleHandleHandlehandlehandle (输入控制)  handle HHandle, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Handle of which to get the key.

KeyKeyKeyKeykeykey (输入控制)  string HTupleUnion[str, int]HTupleHtuple (string / integer) (string / int / long) (HString / Hlong) (char* / Hlong)

Key to get.

结果

如果参数有效,算子 get_handle_objectget_handle_objectGetHandleObjectGetHandleObjectGetHandleObjectget_handle_object 返回值 2 ( H_MSG_TRUE )。否则,将抛出异常。

替代

get_handle_tupleget_handle_tupleGetHandleTupleGetHandleTupleGetHandleTupleget_handle_tuple

另见

get_handle_paramget_handle_paramGetHandleParamGetHandleParamGetHandleParamget_handle_param

模块

基础