In the Save CAD drawings, but also to save the basic information (web version)

The main use of Function:


MxDrawXCustomFunction::Mx_SaveDwgToURLEx


Save DWG files to spread function on the server. Details are as follows:


parameter Explanation

pszServerUrl

Server URL address, such as: www.mxdraw.com pass if empty, the program automatically takes the start point x coordinate of the current page server linear

pszServerProgramUrl

File upload handler server, such as: upload.asp

pszComponentName

HTML component name, the equivalent of a Form HTML page file1 in

pszPort

Port handling services, such as:. _T ( "80")

pszFileTag

File name sign value, form submission event filename value. Is "Content-Disposition: form-data; name =" file1 "; filename =" filename value ymgcw.dwg "is empty by default, the program automatically takes a temporary value.


js implemented Definitions:


1
2
3
4
5
6
7
8
9
10
11
12
13
var param = MxDrawXCtrl_Obj.Call( "Mx_NewResbuf" , "" );
param.AddString(getcurpath(), -10);             //  服务器网址地址,如:www.mxdraw.com
param.AddString( "/Save.aspx" , -10);             //  服务器的文件上传处理程序,如:upload.asp
param.AddString( "FileComponentName" , -10);      //  HTML组件名称
param.AddString( "80" , -10);                     //  服务处理端口. 如:_T("80")
param.AddString( "test.dwg" , -10);               //  文件标志名称值,表单提交事件中filename值
var ret = MxDrawXCtrl_Obj.CallEx( "Mx_SaveDwgToURLEx" , param);       
if (ret.AtString(0) == "Ok" ) {
 
     alert( "成功" );
}        else {
     alert(ret.AtString(1));
}

Guess you like

Origin www.cnblogs.com/yzy0224/p/10983670.html