.NET

Reply
Active Contributor
murali.pandey
Posts: 31
Registered: ‎12-18-2008
Message 1 of 4 (150 Views)

preview AutoCad Map query

150 Views, 3 Replies
04-25-2012 11:50 PM

how can I  query autocad map data in preview mode,and store these objects in a collection by using C#.

(I want to use simple query like all lwpolyline having layer = "test" and color = 3). If I run this query in draw mode multiple times what will happen? (means possibilty of duplicate objects??)

 

Thanks

Murali

*Expert Elite*
Alfred.NESWADBA
Posts: 9,420
Registered: ‎06-29-2007
Message 2 of 4 (149 Views)

Re: preview AutoCad Map query

04-25-2012 11:57 PM in reply to: murali.pandey

Hi,

 

do you need any Map3D functionality like re-projection depending on different geo-coord-systems or something like saveback?

If not I had much more luck replace the Map-query-functionality by my own routine, just

  • open the external database(s)
  • get the modelspace-blocktablerecord
  • scan it to get the objectid's matching the ObjectClass (DxfName of the Objecttype), if the objecttype is correct you can then check the other properties you want to compare
  • does the object match, collect it by saving handle and drawing-filename into an own list.

 

- alfred -

-------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at
-------------------------------------------------------------------------
Active Contributor
murali.pandey
Posts: 31
Registered: ‎12-18-2008
Message 3 of 4 (146 Views)

Re: preview AutoCad Map query

04-26-2012 12:07 AM in reply to: Alfred.NESWADBA

I have to use map query only to show(preview) the quried data into the current drawing and do not want to do any type of editing in quried dwg. Before it I have to set the coordinate system say XYZ of the curent dwg.

 

 

Thanks

Murali

*Expert Elite*
Alfred.NESWADBA
Posts: 9,420
Registered: ‎06-29-2007
Message 4 of 4 (143 Views)

Re: preview AutoCad Map query

04-26-2012 12:13 AM in reply to: murali.pandey

Hi,

 

>> I have to use map query only to show(preview) the quried data into the current drawing

E.g. use WorlDraw (or at least JIG without mouse-move-following) then, it's just a preview and not the adding to the database then.

 

- alfred -

-------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at
-------------------------------------------------------------------------
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Are You Going To Be @ AU 2014? Feel free to drop by our AU topic post and share your plans, plug a class that you're teaching, or simply check out who else from the community might be in attendance. Ohh and don't forgot to stop by the Autodesk Help | Learn | Collaborate booths in the Exhibit Hall and meet our community team if you get a chance!