Set Up the HWPM Pages
-
Click the Control view tab.
-
Select utils from the categories drop-down menu.
-
Select the Label control and drag it into the Page view
panel.
-
In the Property view panel, set the following:
Instance Name: DEMO_LabelFilename
Text: Filename:
-
Highlight and drag the Text field control from the
Control view into the Page view panel and place it beside the label.
- In the Property view, set Instance Name to DEMO_TextFilename.
- Highlight and drag the File browser control into the Page view panel.
- Set Instance Name to DEMO_FBFilename.
- Click the File Filter in the Property view panel.
-
Click Add and type iges in the
Extension column.
- Click Close.
- Click Script located next to the OnClicked property.
- Set the Script Type to HWPM Script from the drop down menu.
-
Type the following HWPM script as the callback to:
var filename = DataModel.GetValue("DEMO_FBFilename"); DataModel.Property("DEMO_TextFilename.value", filename);
- Click Close.
- Select the Apply button in the Page view panel and change Text to Import.
- Click Script located next to the OnClicked property.
-
Select TCL Script from the drop down menu and enter the
following script:
set filename [::hw::pmgr::PmgrGetData 0 "DEMO_TextFilename.value"]; set filename [file join $filename]; *feinput #iges\\\iges $filename 0 0 -0.01 1 0";
- Click Close.
-
Click the Layout tab.
You may need to dock the tab using the pushpin icon.
-
Experiment with the different layout settings. For example, try setting the
following on for the added controls:
Left: Anchor
Top: Fixed
Right: Free
Bottom: Free
- Create a new page using the Add Page icon.
-
Select Control view and drag the
Label control on the new page. Set the
following:
Instance Name: DEMO_LabelMeshSize
Text: Mesh Size
- Highlight and drag a Text field control beside the label.
- Set the Instance Name: as DEMO_TextMeshSize.
- Click Apply and change Text to Mesh.
-
Write the following TCL script as the callback to the OnClicked property of the
Apply button:
set meshsize [::hw::pmgr::PmgrGetData 0 "DEMO_TextMeshSize.value"]; *createmark surfaces 1 "all"; eval *defaultmeshsurf 1 $meshsize 2 1 1 0 1 1 1 0 0 0 0;
- Click Close.