First link your DBase I assume its Access so set
your references to use ADO, Microsoft ADO...". Dim a string Variable to link
your DBase with.
'Place this UNDER Option Explicit at the beginning
of your code.
Public Const strYourString As String =
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\YourDBase.mdb"
"Private Function" OR "Public Sub" 'you choose'
modGetArea()
'this is an example of your code for the DBase
access
Dim polMyPolyline As AcadPolyLine, strMyString As
String
Dim strDBaseHandle As String, cnnConnection As New
ADODB.Connection
Dim rstMyRecordset As New
ADODB.Recordset
Dim strHandle As String
cnnConnection.Open strYourString
size=2> rstMyRecordset.CursorLocation =
adUseClient
rstMyRecordset.CursorType =
adOpenKeyset
rstMyRecordset.LockType =
adLockOptimistic
'tblYour is the name of the table containing the
Handle for the Polyline and the Area of the
Polyline
rstMyRecordset.Open "'tblYour ", cnn,
adOpenDynamic
Do While Not rstMyRecordset.EOF
strHandle = rstMyRecordset!Handle
'Handle is the name of the field in the Table where the objects handle
is stored.
set polMyPolyLine =
thisdrawing.HandleToObbject(strHandle)
strMyString =
polMyPolyLine.Area
rstMyRecordset!Area = strMyString
'If you are using the Field AREA as a number in your
database then you need to use this
'rstMyRecordset!Area = Val(strMyString) OR
USE rstMyRecordset!Area = CInt(strMyString)
' I recommend the first one.
Loop
End "Function OR Sub"
This will help you on your way.
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
Thanks
for your response.
Could you go into to more detail of how to do this, I haven't used VBA
before?