>>Has anyone used the Vertical Mapper SDK<<
Yes, you can use all VM from MapBasic through the VM SDK (get it from
your MapInfo reseller). The SDK is a manual with declarations and some
samples. I think it pretty hardcore and heavy to debug since the dll
crash with every little mistake your make with very poor debug messages
but this one "Call vmGetErrorText(lErrCode, sErrMsg)"
Here is a fragment of a sample on calculating intervisibility:
****************************
.....
.....
sPath =ApplicationDirectory$() + "Datakbh\" + smGRDtabnam + ".tab"
'Get the vm grid ID
fGrd = vmOpenGrid(sPath, 0)
If fGrd = 0 Then
Note "Error referencing grid: " + sPath
End If
lErrCode = vmInterVisibility(fgGridID, sResultsMIF, sLineMIF, dFromX,
dFromY, dFromZAdjust,
dToX, dToY, dToZAdjust, dEarthCurvature, sZUnitDescription,
iReceiverVisible, dObstructionHeight, dToAdjustment,
dFromAdjustment,
iNumSamples, tPointToPointData())
' vmInterVisibility forgets the very last node - this is a fix for thix
nGridValue =
vmGetGridValue(dToX,dToY,fgGridID,plReturnType,pdGRDValue,ppszGRCValue)
Insert Into FRESNEL_DATA (Distance,E)
Values (ObjectLen(oCrossSectionLine,"m"),Round(pdGRDValue,1))
' Get ground height
Ant.fSurfaceLevel2 = Round(pdGRDValue,0.1)
nGridValue =
vmGetGridValue(dFromX,dFromY,fgGridID,plReturnType,pdGRDValue,ppszGRCVal
ue)
Ant.fSurfaceLevel1 = Round(pdGRDValue,0.1)
If lErrCode <> 0 Then
Print ERR_VMCALL
End If
.....
.....
****************************
The declaration you want is:
Declare Function vmTrimGrid Lib "vmAPI.dll" (pszTrimTableName As String,
ByVal dwTrimRow As Integer, ByVal GridID As Integer, pszGridTableName As
String, ByVal ProgressUpdate As Integer) As Integer
But you will need the VM-SDK manual to digest it.
Do not forget the vmOpenGrid function at the top of your code.
HTH,
Jakob
Jakob Lanstorp
Senior Consultant
Geographical Information & IT
COWI A/S
Odensevej 95
5260 Odense S.
Tel +45 6311 4900
Fax +45 6311 4949
Mob +45 5050 8087
E-mail [EMAIL PROTECTED]
http://www.cowi.dk
http://www.cowi.com
-----Original Message-----
From: Dale Atkinson [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 07, 2005 6:12 AM
To: [email protected]
Subject: MI-L Vertical Mapper through Mapbasic
Has anyone used the Vertical Mapper SDK? I am especially interested in
the VmTrimGrid function. If anyone can send me some sample code which
uses a VM dll it would be greatly appreciated.
Cheers,
Dale Atkinson
Tasmania Fire Service
---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 17770