Note is not displaying on HV window

Manjunath Desar
Manjunath Desar Altair Community Member
edited June 2022 in Community Q&A

Hi Support Team,

 

I have developed script to create Note for element ID and contour value. I have drawn with Clinet handle, but note is not appearing on the Hyperview window. Once I click create new note manually in Note Tab it will show but through script note is not apperaing. Can please look into this issue. I have attached script for your reference.

set t [::post::GetT];

set note_id [elAvg$Wn AddNote]

set n_handle [elAvg$Wn GetNoteHandle noteH$Wn $note_id]

noteH$Wn SetAttachment "element $model_id $maxElemID"
noteH$Wn SetPositionToAttachment true
noteH$Wn SetPosition right
noteH$Wn SetPosition top

noteH$Wn SetPosition 1 1
noteH$Wn SetBorderThickness 1

noteH$Wn SetLabel "Max Contour value"
#noteH$Wn SetText "NodeID {entity.id} \nContour_Value {entity.contour_val}"
noteH$Wn SetText "Element ID $maxElemID \n Contour Value $ElemVal";
#elAvg$Wn Draw

noteH$Wn SetAlignment "left"
noteH$Wn SetTextColor "255 255 255"
noteH$Wn SetBackgroundColor "0 0 0"

noteH$Wn SetScreenAnchor false;
noteH$Wn SetTransparency true;
noteH$Wn SetVisibility true;
elAvg$Wn Draw;

 

 

Answers

  • Ben Buchanan
    Ben Buchanan
    Altair Employee
    edited October 2021

    I wasn't sure what handles were what in your script but if elAvg$Wn is the client handle then in the last line (Draw) if you change this to the window handle it should work.  Otherwise if elAvg$Wn is your window handle I think you need to change the AddNote command to use the client handle.

  • Nagahashi Kouta
    Nagahashi Kouta Altair Community Member
    edited June 2022

    Hello

    I'm not sure what do you mean by "note is not appearing on the Hyperview window".Is it not visible in the picture you capture with the script?I have reproduce your scripts and didn't find the problem.

    And also there are a lot of repetitively defined commands in your code. Are you sure these commands are necessary? Please provide more information.

    Just for your reference