请教:熟悉mapbasic的请进 需要帮助
vb吧
全部回复
仅看楼主
level 2
dafeng1230 楼主
Include "MAPBASIC.DEF" Dim gsWorkPath,filename,fullname,datapath,tylx,dtlx,st as String Dim name as string Dim pos as integer 'OnError Goto my_handle gsWorkPath = ApplicationDirectory$() datapath = Left$(gsWorkPath,len(gsWorkPath)-9) If FileExists(datapath + "projectinfo.tab") = False Then filename = datapath + "projectinfo.dbf" fullname = datapath + "projectinfo" Register Table filename Type "DBF" Into fullname End If Open Table datapath + "projectinfo.tab" Fetch First From projectinfo datapath = projectinfo.datapath open table datapath + "mytab" fetch first from mytab st = mytab.name Drop table mytab pos = InStr(1, st, "\") If pos <> 0 Then open table st st = PathToTableName$(st) Else open table datapath + st + ".tab" End If map from st tylx = tableinfo(st,TAB_INFO_COORDSYS_CLAUSE) dtlx = "set map " + tylx run command dtlx set map scale 1 units "m" for 10 units "km" if fileexists(datapath + "limit.tab") = false then create table limit(mc char(10)) file datapath + "limit" end if open table datapath + "limit.tab" tylx = "create map for limit " + tylx run command tylx add map auto layer limit commit table limit close all 最好加上注释 谢谢 下面是vb调用的.mbx的原代码 mapBasic我不懂 这里老出错 原代码: filename = "" & gsWorkPath & "" & "MapBasic\Createbound.mbx" objmap.Do "run application """ & filename & """" 怎么解决?objmap是mapinfo对象
2006年12月24日 05点12分 1
level 2
dafeng1230 楼主
顶一次
2006年12月25日 04点12分 2
1