Message 1 of 2
VB6 Error

Not applicable
07-03-2009
10:07 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi all,
I was trying to query map through VB6 application I am creating. My code is as follows:
Set amap = Application.GetInterfaceObject("Autocadmap.application.2")
Set prj = amap.Projects(0)
'Get Current Query
Set qry = prj.CurrQuery
qry.Clear
'_________________Done this far
'Attach DWG
Set atdr = prj.DrawingSet.Add("MAPTUT:\TUTORIAL IX\citymap7.dwg")
acdoc.SendCommand ("MAPWSACTION" & vbCr & vbCr & vbCr)
'Get Main Branch
Set mainqrybr = qry.QueryBranch
'Create Layout of Leaves and Branch
Set qrylf = mainqrybr.Add(kLocationCondition, kOperatorAnd)
--> the moment it reaches qrylf my VB6 gives error end quits...can somebody help urgently?
Regards
RM
I was trying to query map through VB6 application I am creating. My code is as follows:
Set amap = Application.GetInterfaceObject("Autocadmap.application.2")
Set prj = amap.Projects(0)
'Get Current Query
Set qry = prj.CurrQuery
qry.Clear
'_________________Done this far
'Attach DWG
Set atdr = prj.DrawingSet.Add("MAPTUT:\TUTORIAL IX\citymap7.dwg")
acdoc.SendCommand ("MAPWSACTION" & vbCr & vbCr & vbCr)
'Get Main Branch
Set mainqrybr = qry.QueryBranch
'Create Layout of Leaves and Branch
Set qrylf = mainqrybr.Add(kLocationCondition, kOperatorAnd)
--> the moment it reaches qrylf my VB6 gives error end quits...can somebody help urgently?
Regards
RM