get_handle_paramT_get_handle_paramGetHandleParamGetHandleParamget_handle_param (算子名称)
名称
get_handle_paramT_get_handle_paramGetHandleParamGetHandleParamget_handle_param — Return information about a handle.
参数签名
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 该算子s 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 (input_control) handle → HHandle, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)
Handle of which to get the parameter.
GenParamNameGenParamNameGenParamNameGenParamNamegenParamNamegen_param_name (input_control) string → HTuplestrHTupleHtuple (string) (string) (HString) (char*)
Parameter to get.
Default:
'keys'
"keys"
"keys"
"keys"
"keys"
"keys"
List of values:
'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 (input_control) string(-array) → HTupleMaybeSequence[str]HTupleHtuple (string) (string) (HString) (char*)
Optional key.
Default:
[]
GenParamValueGenParamValueGenParamValueGenParamValuegenParamValuegen_param_value (output_control) 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)
. Otherwise, an exception is raised.
可能的后置算子
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
模块
Foundation