AutoCAD Map 3D Developer
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
VB.NET Map Query
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Hi All,
I have a problem with VB.NET and Map using ActiveX interface.
I have an error when I try to add a new condition to QueryBranch
Ex
Re: VB.NET Map Query
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Hi Matteo,
Check if the following approach resolves this issue ?
<code_begin>
Public Function TestDefQuery()
Dim mapApi As Autodesk.Gis.Map.MapApplication
mapApi = MAP.HostMapApplicationServices.Application
Dim project As PROJECT.ProjectModel
project = mapApi.ActiveProject
'create location condition
Dim JointOp As New MAPCONSTANTS.JoinOperator()
Dim locationType As New MAPCONSTANTS.LocationType()
'Dim qryCondition As MAPQUERY.LocationCondition = New MAPQUERY.LocationCondition(JointOp.OperatorAnd, locationType.LocationInside)
Dim qryCondition As MAPQUERY.LocationCondition = New MAPQUERY.LocationCondition(JointOp.OperatorAnd)
Dim allBdry As MAPQUERY.AllBoundary
allBdry = maputil.NewAllBoundary()
qryCondition.Boundary = allBdry
'create branch
Dim qryBranch As New MAPQUERY.QueryBranch(JointOp.OperatorAnd)
qryBranch.AppendOperand(qryCondition)
End Function
<code_end>
Thanks,
Partha Sarkar
Autodesk Developer Network
Partha Sarkar
Developer Technical Services
Autodesk Developer Network
