////////////////////////////////////////////////////////////////////////////
// System Pre-define Functions
// 95099372-ef3e-11ea-9c81-bf848405c62e
//Callback of data preparation stage before UI is fully loaded.
function OnInitializeData(reload, preview) {
PUI(()=>{
//you can access the 'ui' namespace in the parent form using the variable 'pui' here.
//The 'pui' variable is valid in all functions of this document.
//For robustness, you'd better use 'PUI(cb);' to access 'pui' variable.
});
}
//Callback after UI is fully loaded and displayed.
function OnReady(reload, preview) {
PUI(()=>{
//you can access the 'ui' namespace in the parent form using the variable 'pui' here.
//The 'pui' variable is valid in all functions of this document.
//For robustness, you'd better use 'PUI(cb);' to access 'pui' variable.
});
}
function OnCloseForm() {
}
function OnException(err) {
//ui.MessageBox('Error', '' + err, MessageBox.Icon.Critical, MessageBox.Button.Ok);
}
//////////////////////////////////////////////////////////////////////////
// Callback Functions.
// 641a254c-ef3e-11ea-bc8a-379bb908bdd7
function OnGuass(){
unit.form.mainfrm.menu(23);
unit.form.mainfrm.OnChangePicture(3, 1);
//unit.form.mainfrm.OnCueline('
提供精确拾取及Brep面的生成,其中按快捷键L或l进行拾取实体或面的切换!
');
unit.form.mainfrm.OnCueline('提供精确拾取及Brep面的生成,其中按快捷键L或l进行拾取实体或面的切换!', 'blue');
}
function OnConstraint(){
unit.form.mainfrm.menu(18);
unit.form.mainfrm.OnChangePicture(3, 1);
//unit.form.mainfrm.OnCueline('设置模型约束!
');
unit.form.mainfrm.OnCueline('设置模型约束!', 'blue');
}
function OnForce(){
unit.form.mainfrm.menu(17);
unit.form.mainfrm.OnChangePicture(3, 1);
//unit.form.mainfrm.OnCueline('设置模型载荷!
');
unit.form.mainfrm.OnCueline('设置模型载荷!', 'blue');
}
function OnloadPeiDian(){
unit.form.mainfrm.menu(5);
unit.form.mainfrm.OnChangePicture(3, 1);
//unit.form.mainfrm.OnCueline('设置均匀加密次数,网格尺寸大小!
');
unit.form.mainfrm.OnCueline('设置均匀加密次数,网格尺寸大小!', 'blue');
}
//The message corresponding callback executed by the docker pane.
// when calling [side_pane].fireEvent(type,para) in the main form.
function OnParentDockerMessage(type, para) {
}
//////////////////////////////////////////////////////////////////////////
// Utils Functions.
// 6c165ad6-ef3e-11ea-987c-b761a131c2fe
function onDragFile(filepath) {
}
function PUI(cb) {
if(pui){cb();}
}
/*Usage of BLOCK_EVENT
BLOCK_EVENT(()=>{
ui.[name].[var] = ...;
});
*/
function BLOCK_EVENT(cb) {
ui.block_event = true;
cb();
ui.block_event = false;
}
//////////////////////////////////////////////////////////////////////////
// template codes for cw callback js.
function CW_DeclareVariable(name, setter, getter) {
if(typeof(__DeclareVariable) === 'function') {
__DeclareVariable(name, setter, getter);
}
}
function CW_DeclareOuterVariable(name) {
if(typeof(__DeclareOuterVariable) === 'function') {
__DeclareOuterVariable(name);
}
}