get_handle_paramT_get_handle_paramGetHandleParamGetHandleParamget_handle_param (算子)
名称
get_handle_paramT_get_handle_paramGetHandleParamGetHandleParamget_handle_param — 返回有关句柄的信息。
签名
def get_handle_param(handle: HHandle, gen_param_name: str, key: MaybeSequence[str]) -> Sequence[Union[int, float, str]]
def get_handle_param_s(handle: HHandle, gen_param_name: str, key: MaybeSequence[str]) -> Union[int, float, str]
描述
get_handle_paramget_handle_paramGetHandleParamGetHandleParamGetHandleParamget_handle_param returns details about HandleHandleHandleHandlehandlehandle in
GenParamValueGenParamValueGenParamValueGenParamValuegenParamValuegen_param_value.
It provides a generic mechanism for inspecting and debugging handles of any
type by returning keys of that handle that can later be queried using
get_handle_tupleget_handle_tupleGetHandleTupleGetHandleTupleGetHandleTupleget_handle_tuple and get_handle_objectget_handle_objectGetHandleObjectGetHandleObjectGetHandleObjectget_handle_object。
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.
Depending on
the value of GenParamNameGenParamNameGenParamNameGenParamNamegenParamNamegen_param_name, the following values can be queried:
- 'keys'"keys""keys""keys""keys""keys":
-
Returns a list of keys that this handle supports in GenParamValueGenParamValueGenParamValueGenParamValuegenParamValuegen_param_value.
Each key contains either a tuple or an iconic object.
For this query, the parameter KeyKeyKeyKeykeykey must be empty.
Note that due to the generic nature of this operator, some of the returned
keys might not be valid for the particular handle.
In this case, get_handle_tupleget_handle_tupleGetHandleTupleGetHandleTupleGetHandleTupleget_handle_tuple or get_handle_objectget_handle_objectGetHandleObjectGetHandleObjectGetHandleObjectget_handle_object will
return an error for those keys.
- 'key_data_type'"key_data_type""key_data_type""key_data_type""key_data_type""key_data_type":
Returns the data type of KeyKeyKeyKeykeykey.
The type is returned in GenParamValueGenParamValueGenParamValueGenParamValuegenParamValuegen_param_value and is either 'tuple'"tuple""tuple""tuple""tuple""tuple"
or 'object'"object""object""object""object""object".
Depending on the type, the key's corresponding value can be queried with
get_handle_tupleget_handle_tupleGetHandleTupleGetHandleTupleGetHandleTupleget_handle_tuple or get_handle_objectget_handle_objectGetHandleObjectGetHandleObjectGetHandleObjectget_handle_object, respectively.
执行信息
- 多线程类型:可重入(与非独占算子并行运行)。
- 多线程作用域:全局(可从任何线程调用)。
- 未采用并行化处理。
参数
HandleHandleHandleHandlehandlehandle (输入控制) handle → HHandle, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)
Handle of which to get the parameter.
GenParamNameGenParamNameGenParamNameGenParamNamegenParamNamegen_param_name (输入控制) string → HTuplestrHTupleHtuple (string) (string) (HString) (char*)
Parameter to get.
默认值:
'keys'
"keys"
"keys"
"keys"
"keys"
"keys"
值列表:
'key_data_type'"key_data_type""key_data_type""key_data_type""key_data_type""key_data_type", 'keys'"keys""keys""keys""keys""keys"
KeyKeyKeyKeykeykey (输入控制) string(-array) → HTupleMaybeSequence[str]HTupleHtuple (string) (string) (HString) (char*)
Optional key.
默认值:
[]
GenParamValueGenParamValueGenParamValueGenParamValuegenParamValuegen_param_value (输出控制) tuple(-array) → HTupleSequence[Union[int, float, str]]HTupleHtuple (string / integer / real) (string / int / long / double) (HString / Hlong / double) (char* / Hlong / double)
Returned value.
结果
如果参数有效,算子 get_handle_paramget_handle_paramGetHandleParamGetHandleParamGetHandleParamget_handle_param 返回值 2 ( H_MSG_TRUE )。否则,将抛出异常。
可能的后继
clear_handleclear_handleClearHandleClearHandleClearHandleclear_handle,
get_handle_tupleget_handle_tupleGetHandleTupleGetHandleTupleGetHandleTupleget_handle_tuple,
get_handle_objectget_handle_objectGetHandleObjectGetHandleObjectGetHandleObjectget_handle_object
另见
get_handle_tupleget_handle_tupleGetHandleTupleGetHandleTupleGetHandleTupleget_handle_tuple,
get_handle_objectget_handle_objectGetHandleObjectGetHandleObjectGetHandleObjectget_handle_object
模块
基础