|
阅读:1215回复:0
初学需要帮助!!!mapbasic 解释
Include "MAPBASIC.DEF" <BR><BR>Dim gsWorkPath,filename,fullname,datapath,tylx,dtlx,st as String <BR>Dim name as string <BR>Dim pos as integer <BR><BR>'OnError Goto my_handle <BR>gsWorkPath = ApplicationDirectory$() <BR>datapath = Left$(gsWorkPath,len(gsWorkPath)-9) <BR>If FileExists(datapath + "projectinfo.tab") = False Then <BR>filename = datapath + "projectinfo.dbf" <BR>fullname = datapath + "projectinfo" <BR>Register Table filename Type "DBF" Into fullname <BR>End If <BR>Open Table datapath + "projectinfo.tab" <BR>Fetch First From projectinfo <BR>datapath = projectinfo.datapath <BR>open table datapath + "mytab" <BR>fetch first from mytab <BR>st = mytab.name <BR>D rop table mytab <BR>pos = InStr(1, st, "\") <BR>If pos <> 0 Then <BR>open table st <BR>st = PathToTableName$(st) <BR>Else <BR>open table datapath + st + ".tab" <BR>End If <BR>map from st <BR>tylx = tableinfo(st,TAB_INFO_COORDSYS_CLAUSE) <BR>dtlx = "set map " + tylx <BR>run command dtlx <BR>set map scale 1 units "m" for 10 units "km" <BR>if fileexists(datapath + "limit.tab") = false then <BR>create table limit(mc char(10)) file datapath + "limit" <BR>end if <BR>open table datapath + "limit.tab" <BR>tylx = "create map for limit " + tylx <BR>run command tylx <BR>add map auto layer limit <BR>commit table limit <BR>close all <BR>最好加上注释 谢谢 这是vb调用的.mbx的原代码 <BR>mapBasic我不懂 这里老出错 <BR>原代码: filename = "" ; gsWorkPath ; "" ; "MapBasic\Createbound.mbx" <BR>objmap.Do "run application """ ; filename ; """" <BR>怎么解决?
|
|