Jump to content

AlphaWelltan

Members
  • Content Count

    3
  • Joined

  • Last visited

About AlphaWelltan

  • Rank
    Newbie

Profile Information

  • Gender
    Male

Recent Profile Visitors

807 profile views
  1. Modifying the default preference should do the trick. Default preferences are located under $ALTAIR_HOME/hw/prefinc. +HyperGraph 2D's preference file: preferences_plot.mvw +HyperGraph 3D's preference file: preferences_plot3d.mvw +HyperGraph 3D's preference file: preferences_post.mvw Add your *BeginMenu, *MenuItem statements to these files. Check HyperWorks Desktop User's Guide for more information: HyperWorks Desktop > Startup Procedures and Customization > Customization > Preference Files:
  2. Hi, You should create a preference file (*.mvw) with *BeginMenu and *MenuItem statements: + Step 1: create a preference file (Ex: MyPreference.mvw) + Step 2: Add these statements to the preference file: *Id(Hyper version here) *BeginDefaults() *BeginMenu(Var_name, label) //make a menu *MenuItem(Var_name, label, TCL, path to tcl file) //drop down list definition *MenuItem.... *EndMenu() *EndDefaults() + Step 3: Register and load your preference file (File>load>preference) Check online help for Preference file statements.
  3. Hi, There're some examples about query control using HyperView's poIQueryCtrl class. Maybe these will help you out: Example #1 This following example script requires that you first load a model: # Get Active model handle ::post::GetActiveModelHandle m # Create an element selection set and add element 100, # then add adjacent m GetSelectionSetHandle eset [m AddSelectionSet element] eset Add "id == 100" eset Add adjacent # Get a query control, set the selection set, then define # the query. The query consists of a dot notation containing # DATASOURCE.FIELD. Data sources can be listed by calling # GetDataSourceList, properties for a particular data source # can be listed by calling GetDataSourceFieldList and passing # the data source to list fields for: # qc GetDataSourceList returns "node element component ..." # qc GetDataSourceFieldList element returns "id config compid ..." m GetQueryCtrlHandle qc qc SetSelectionSet [eset GetID] qc SetQuery "element.id element.connectivity" # once the query has been set and the selection set has been assigned # to the query control, the data can be extracted by retrieving an iterator # and cycling through all the items in the set and calling GetDataList. qc GetIteratorHandle qciter for {qciter First} {[qciter Valid]} {qciter Next} { puts [qciter GetDataList] } # Release all handles qciter ReleaseHandle qc ReleaseHandle eset ReleaseHandle m ReleaseHandle Example #2 The following example script will print the raw data of a displacement data type for all nodes: hwi OpenStack set t [::post::GetT] ::post::GetActiveModelHandle m$t m$t GetSelectionSetHandle s$t [m$t AddSelectionSet node] s$t Add all m$t GetQueryCtrlHandle q$t q$t SetSelectionSet [s$t GetID] q$t SetDataSourceProperty result datatype Displacement; q$t SetQuery "node.id result.value" q$t GetIteratorHandle i$t; for { i$t First } { [i$t Valid] } { i$t Next } { puts "data is [i$t GetDataList]" } hwi CloseStack
×
×
  • Create New...