AutoCAD Map 3D General Discussion

AutoCAD Map 3D General Discussion

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

Querying Object Data returns all objects

282 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*
Alfred.NESWADBA
Posts: 9,608
Registered: ‎06-29-2007
Message 2 of 3 (262 Views)

Re: Querying Object Data returns all objects

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

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
-------------------------------------------------------------------------
Valued Mentor
parkr4st
Posts: 475
Registered: ‎03-24-2004
Message 3 of 3 (248 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. 

 

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.