AutoCAD Map 3D General Discussion

AutoCAD Map 3D General Discussion

Valued Contributor
Posts: 94
Registered: ‎06-21-2005
Message 1 of 3 (255 Views)

Querying Object Data returns all objects

255 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*
Posts: 9,071
Registered: ‎06-29-2007
Message 2 of 3 (235 Views)

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
Posts: 451
Registered: ‎03-24-2004
Message 3 of 3 (221 Views)

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. 


Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.