Skip to content

Commit

Permalink
Update for EnSight 242 (#336)
Browse files Browse the repository at this point in the history
  • Loading branch information
randallfrank authored Nov 10, 2023
1 parent a2ddc2f commit f721eac
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/ansys/pyensight/core/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -1510,6 +1510,13 @@ def _convert_ctor(self, s: str) -> str:
tail = s.find(", cached:yes")
if tail == -1:
break
# Subtype (PartType:, AnnotType:, ToolType:)
subtype = None
for name in ("PartType:", "AnnotType:", "ToolType:"):
location = s.find(name)
if (location != -1) and (location > id):
subtype = int(s[location + len(name) :].split(",")[0])
break
# isolate the block to replace
prefix = s[:start]
suffix = s[tail + tail_len :]
Expand All @@ -1526,8 +1533,11 @@ def _convert_ctor(self, s: str) -> str:
else:
subclass_info = ""
if attr_id is not None:
# if a "subclass" case and no subclass attrid value, ask for it...
if classname_lookup is not None:
if subtype is not None:
# the 2024 R2 interface includes the subtype
subclass_info = f",attr_id={attr_id}, attr_value={subtype}"
elif classname_lookup is not None:
# if a "subclass" case and no subclass attrid value, ask for it...
remote_name = self.remote_obj(objid)
cmd = f"{remote_name}.getattr({attr_id})"
attr_value = self.cmd(cmd)
Expand Down

0 comments on commit f721eac

Please sign in to comment.