AutoCAD Map 3D General Discussion

AutoCAD Map 3D General Discussion

Valued Contributor
94 Posts
5 Kudos
Registered: ‎06-21-2005
Post 1 of 3

Querying Object Data returns all objects

286 Views, 2 Replies
03-05-2012 10:48 AM

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?

*Expert Elite*
9,827 Posts
1,216 Kudos
Registered: ‎06-29-2007
Post 2 of 3

Re: Querying Object Data returns all objects

03-06-2012 12:36 PM in reply to: justind



are these fields of type STRING or any numeric datatype?

What happens if you try to select   < 1    ?


- alfred -

Ingenieur Studio HOLLAUS ...
Valued Mentor
491 Posts
35 Kudos
Registered: ‎03-24-2004
Post 3 of 3

Re: Querying Object Data returns all objects

03-07-2012 05:47 AM 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. 


Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Are you interested in helping shape the future of the Autodesk Community? To participate in this brief usability study, please click here. Your time and input is greatly appreciated!