I am trying to use PoI partclass api for getting scale but it is not working for any parthandle.
set t [clock clicks];
hwi OpenStack;
hwi GetSessionHandle sess$t;
sess$t GetProjectHandle proj$t;
proj$t GetPageHandle page$t [proj$t GetActivePage];
page$t GetWindowHandle win$t [page$t GetActiveWindow];
win$t GetClientHandle client$t;
set Id_ActiveModel [client$t GetActiveModel];
client$t GetModelHandle mod$t [client$t GetActiveModel];
mod$t GetPartHandle part$t 2;
part$t SetScale " 2 2 2"
client$t Draw;
this code is note working for part id 2.
Answers
-
Hi,
If your goal is to change the scale of the deformed shape, then you could use the SetScale command from the poIScaleCtrl Class API.
For instance:
set t [clock clicks]
hwi OpenStack
::post::GetActiveModelHandle mod$t
mod$t GetResultCtrlHandle res$t
res$t GetScaleCtrlHandle scale$t
scale$t SetInterpolationScaleMode "scale"
scale$t SetScale "10 10 10"More details here:
https://help.altair.com/hwdesktop/hwd/topics/chapter_heads/poiscalectrl_class_r.htm
Also, another simpler solution could be to use the HWC language instead => just type "scale deformed value=10.000000" in the HWC console.More details about HWC language here:
https://help.altair.com/hwdesktop/hwd/topics/reference/hwc/introduction_hwc_r.htm0