Author Topic: Extracting doors  (Read 3109 times)

0 Members and 1 Guest are viewing this topic.

veggen

  • Guest
Extracting doors
« on: June 18, 2009, 06:19:27 AM »
Hi. I posted a similar topic on AutoDesk forums, if this is something frowned upon, I apologize. That topic is located here.

Now, here's the scenario: I am trying to extract information on doors from a .dwg file using VB.Net. What I can not understand is if there is a way for me to differentiate a door from other blocks easily. Namely, I am interested in format, type, direction and similar door info.

The original plan has changed, and now I need to read a .dwg directly from VB.Net, without integrating into AutoCAD (if possible).

If anyone has any idea on where I should start... I'd be very, very grateful to hear it.

Draftek

  • Guest
Re: Extracting doors
« Reply #1 on: June 18, 2009, 08:07:43 AM »
Accessing a door block from autocad is easily done. Using a web service from within autocad is easily done.

accessing the .dwg outside of using autocad is going to require some low-level coding with knowledge of the format - THAT is not easily done without the purchase of either ReadDwg or similar.

veggen

  • Guest
Re: Extracting doors
« Reply #2 on: June 18, 2009, 10:11:51 AM »
Purchasing the license is perfectly acceptable if that's the tool that will get the job done.

Still, since the license is quite expensive, I might get the decision maker to rethink the option of integration with AutoCAD.
Do you maybe have some pointers on how to get the door data that way?
I've seen examples that open the file, extract blocks etc, but, as I said, what I can not understand is if there is a way for me to differentiate a door from other blocks easily. This might be a very dumb question, but I'm almost completely unfamiliar with the way AutoCAD stores data, so even some basic pointers would be of great help.

One way or the other, thanks for your time.
« Last Edit: June 18, 2009, 10:25:07 AM by veggen »

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Extracting doors
« Reply #3 on: June 18, 2009, 11:12:41 AM »
The best way would be if the door block is named in such a way that you can tell which blocks are doors.  Usually they are.
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

veggen

  • Guest
Re: Extracting doors
« Reply #4 on: June 18, 2009, 12:35:08 PM »
Hmmm... Sadly I will never be the one who creates blocks, my job is only to consume them... But I'll check some samples that I've been given to see if I can find a pattern...

In case you come up with an additional way to recognize doors, drop a message....

And thank you for this tip.

Glenn R

  • Guest
Re: Extracting doors
« Reply #5 on: June 18, 2009, 05:37:44 PM »
Tim's on the money. Unless you can guarantee that a 'block' of a 'door' is called, for example, 'Door', or the block is tagged through some other process to define it's a 'Door', that your code can recognise, you're SOL.

As an example, you can't tell from just the geometry that makes up the block, that the given block, is a 'Door'. Does that make sense?

kdub_nz

  • Mesozoic keyThumper
  • SuperMod
  • Water Moccasin
  • Posts: 2139
  • class keyThumper<T>:ILazy<T>
Re: Extracting doors
« Reply #6 on: June 18, 2009, 07:53:04 PM »

BUT,

You won't need to hardcode the blockNames into your code ..
You CAN create a data file ( .xml, .txt, csv etc) which holds the relevent names and/or data.
.. that way the app decomes (sort of) maintainable and scalable.

//kdub
Called Kerry in my other life
Retired; but they dragged me back in !

I live at UTC + 13.00

---
some people complain about loading the dishwasher.
Sometimes the question is more important than the answer.

veggen

  • Guest
Re: Extracting doors
« Reply #7 on: June 19, 2009, 06:42:50 AM »
It's going to be quite complicated since the application needs to work with many languages, but external config files, as kdub suggested, might alleviate the problem.

Thank you guys for all the tips :) Now I have some starting point.

If you happen to come up with anything else that could me relevant, please make sure you post it...

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Extracting doors
« Reply #8 on: June 19, 2009, 08:14:58 PM »
Quote
It's going to be quite complicated since the application needs to work with many languages, ...


veggen ,

not as complicated as it may first appear.
Your 'Client' should be able to provide you with a listing of each blockName he want to extract the data from
and any attribute tags that hold data
and any xData that may be attached

... these will be simple strings that won't require any translation

good fortune with the task :)

// kdub

kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.