appemit支持谷歌chrome edge浏览器在线操作CATIA CAD

appemit支持谷歌chrome edge等浏览器在线操作CATIA  CAD等

 1  AE.InitApp 初始化连接好websocket

2 OpenApp 打开catia,并且执行read open方法打开part1.CATPart文件

          var ReqPar1={"emit":"open","Obj":"catia","AppType":1,"AppFollow":31
                               ,"src":["demo/htmlDemo/file/part1.CATPart"]     //设置了src 则会Read然后Open
                               ,"pos":1
                              , "par":{"objName":"catia","HttpPost":null,"show_UpdateTool":true,"AppMethod":"POST" } //catia必须要"AppMethod":"POST" 方式传递消息
                              ,"par0":{"noCaption":28  //嵌入时默认去掉标题栏高度,0保留
                                          , "embed": 1          //默认1嵌入  -1浮动,   0独立
                                          , "AppStep":{"init":null, "destroy":null, "closed":null
                                          ,"loaded":"if (AppJsObject.catia) {return {name:AppJsObject.catia.name,FullName:AppJsObject.catia.FullName};}"}  //反馈name,FullName

                                          }  
                             
                              }

          
      
              AE.OpenApp(ReqPar1);

 

同时可以使用AppJsObject.catia 来操作 Application

var    codeStr1 =   AE.txt2code(function(){/*!@preserve
var doc1=AppJsObject.catia.Documents.Add("Part") ;
 
doc1.SaveAs(AppJsFun.fullpath("1.CATPart"));
doc1.Close();
// AppJsFun.log(AppJsObject.catia.Windows);
 return {Visible:AppJsObject.catia.Visible,path:AppJsFun.fullpath("1.CATPart")};    //反馈 
*/});
 
   var  Req3={"emit":"runCmd","Obj":"catia","AppId":1,"codeStr":codeStr1,"par":{"AppMethod":"POST"} }   
   
  AE.OpenApp( Req3 );

更多接口

catia v5R20 接口
 Name: Application
HelpString:
Interface:  {7D2C8116-DC44-0000-0280-030BA6000000}
 QueryInterface(pointer, pointer&)
 AddRef()
 Release()
 GetTypeInfoCount(pointer&)
 GetTypeInfo(INT, INT, pointer&)
 GetIDsOfNames(pointer, pointer, INT, INT, pointer&)
 Invoke(int, pointer, INT, WROD, pointer, pointer&, pointer&, pointer&)
 Destructor()
 GetMetaObject()
 IsA()
 IsAKindOf()
 GetImpl()
 SetImpl()
 IsNull()
 IsEqual()
 SurChargeQI()
 ChangeComponentState()
 Application _get
 Parent _get
 Name _get
 Name(pointer)
 GetItem(pointer)
 Documents _get
 ActiveDocument _get
 Windows _get
 ActiveWindow _get
 Printers _get
 ActivePrinter _get
 ActivePrinter(pointer)
 FileSystem _get
 SystemService _get
 FullName _get
  Path _get
  FileSearchOrder _get
  FileSearchOrder(pointer)
  LocalCache _get
  LocalCache(pointer)
 CacheSize _get
 CacheSize(int)
 Visible _get
 Visible(bool)
 Interactive _get
 Interactive(bool)
 DisplayFileAlerts _get
 DisplayFileAlerts(bool)
 Caption _get
 Caption(pointer)
 StatusBar _get
 StatusBar(pointer)
 Width _get
 Width(float)
 Height _get
 Height(float)
 Batch _get
 Batch(pointer)
 Left _get
 Left(float)
 Top _get
 Top(float)
 Help(pointer)
 Quit()
 CreateMail()
 CreateSendTo()
 MsgBox(pointer, word, pointer, pointer, int)
InputBox(pointer, pointer, pointer, word, word, pointer, int)
FileSelectionBox(pointer, pointer, pointer)
StartCommand(pointer)
StartWorkbench(pointer)
 GetWorkbenchId()
 Settings _get
 SettingControllers _get
 SystemConfiguration _get
 RefreshDisplay _get
 RefreshDisplay(bool)
 HSOSynchronized _get
 HSOSynchronized(bool)
{
NewFile=null;
OpenFile=null
}

 //
 Name: Windows
 //
HelpString:
Interface:  {7FBD96B9-3FA0-0000-0280-030BA6000000}
 QueryInterface(pointer, pointer&)
 AddRef()
 Release()
 GetTypeInfoCount(pointer&)
 GetTypeInfo(INT, INT, pointer&)
 GetIDsOfNames(pointer, pointer, INT, INT, pointer&)
 Invoke(int, pointer, INT, WROD, pointer, pointer&, pointer&, pointer&)
 Destructor()
 GetMetaObject()
 IsA()
 IsAKindOf()
 GetImpl()
 SetImpl()
 IsNull()
 IsEqual()
 SurChargeQI()
 ChangeComponentState()
 Application _get
 Parent _get
 GetItem(pointer)
 Name _get
 Count _get
 _NewEnum _get
 Item(pointer)
 Arrange(pointer)

Published by

风君子

独自遨游何稽首 揭天掀地慰生平

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注