Model.hm_me_protoreplistget#
- Model.hm_me_protoreplistget(prototypeID, repType='')#
Returns a list of the representation keys from a part prototype. A part prototype should be given. If specific representation type is given via options, the list will contain only representations of that type.
- Parameters:
prototypeID (unsigned int) – The ID of the part or part assembly from which to retrieve the representation key list.
repType (hwString) – The optional list of inputs passed as a comma separated string. Valid options are: type=<type>.
- Returns:
hwReturnStatus- Status objectHmQueryResult- Result object containing the output values:repKeys (list of strings)
Examples#
Retrieve the list of all representation keys for part with name “ SpotWelds “#import hm import hm.entities as ent model = hm.Model() propP = ent.Part(model, "SpotWelds") _,result = model.hm_me_protoreplistget(prototypeID=propP.prototype_id) print("repKeys", result.repKeys)
Retrieve the list of CAD representation keys for part with name “ SpotWelds “#import hm import hm.entities as ent model = hm.Model() propP = ent.Part(model, "SpotWelds") _,result = model.hm_me_protoreplistget(prototypeID=propP.prototype_id, repType="CAD")) print("repKeys", result.repKeys)