How to get Normal of Element

In this post, I will show you how to write a proceduce to query an element, and get normal info of an element in HyperView

proc getNormalEle { windowIndex eid} {
hwi OpenStack
set t [clock clicks]
hwi GetSessionHandle mySession$t
  mySession$t GetProjectHandle myProject$t
     set pageIndex [myProject$t GetActivePage]
     myProject$t GetPageHandle myPage$t $pageIndex
       myPage$t GetWindowHandle myWindow$t $windowIndex
          myWindow$t GetClientHandle myPost$t
            set modelIndex [myPost$t GetActiveModel]
               myPost$t GetModelHandle myModel$t $modelIndex
             set l [myModel$t GetEntityInfo element normal  $eid]
myModel$t ReleaseHandle
myPost$t ReleaseHandle
myWindow$t ReleaseHandle
myPage$t ReleaseHandle
myProject$t ReleaseHandle
mySession$t ReleaseHandle
hwi CloseStack
return $l
}

how to use above proceduce, you just enter the window id that have your model, and the element id you want to querry

example: set normalE100 [getNormalEle 1 100]

that will get normal of element id 100 in window id 1. And then return to normalE100 variable

hope useful to you

Cudaisoai

20211106

Published by Cudaisoai

my name is Cudaisoai, nice to meet you. tôi là Cudaisoai, rất vui được gặp bạn.

Leave a comment