AutoCAD Map 3D Forum
Welcome to Autodesk’s AutoCAD Map 3D Forums. Share your knowledge, ask questions, and explore popular AutoCAD Map 3D topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Querying Object Data returns all objects

2 REPLIES 2
Reply
Message 1 of 3
enderak
479 Views, 2 Replies

Querying Object Data returns all objects

I have a drawing with a bunch of polylines with object data attached. The polylines represent roads, and among the object data is a road number. A typical road number might be "2000" and a road without a number assigned yet would be "0"

 

I am trying to run a query that pull out just the objects where the road number field is 0. If I try to query based on object data where the field = 0, I get returned all of the polylines whether the field is 0 or not. If I query with "2000", I get returned just the single road with that number as expected.

 

I've tried several different ways to make this work and I'm not sure what is wrong. I have tried with the number as integers, and doing field = 0, field <= 0, field < 1 and that didn't work, so then I converted it over to a character field and have tried field = 0 and field = "0" - nothing seems to work. Is there something with the field being zero that is causing issues and is there a way to make this work?

2 REPLIES 2
Message 2 of 3
Alfred.NESWADBA
in reply to: enderak

Hi,

 

are these fields of type STRING or any numeric datatype?

What happens if you try to select   < 1    ?

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at ... blog.hollaus.at ... CDay 2024
------------------------------------------------------------------------------------
(not an Autodesk consultant)
Message 3 of 3
parkr4st
in reply to: Alfred.NESWADBA

i'd try to send all the lines to a sdf with OD and check how the querying works in that format.  If it works right, mapimport back to line drawing objects with the OD attached and try again.  It may eliminate some sort of error from your data. 

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost