Author Topic: Is this concept the way to go?  (Read 1857 times)

0 Members and 1 Guest are viewing this topic.

elliottpd

  • Guest
Is this concept the way to go?
« on: April 14, 2011, 08:01:54 PM »
I'd like to get your thoughts and reactions to an idea...
My company needs to implement a block tracking system that allows for counting blocks across a project.  Each project consists of several related drawings, plus drawings at different stages of development, and at different revision levels.  Often portions of drawings are wblocked and pulled into new drawings.  Using vb.net we intend to pull various data about the blocks into an SQL database.  Since AutoCAD handle numbers will be changing as parts of drawings are wblocked and inserted, I can't use them as unique ids for tracking the blocks.  I need a method that keeps the id consistent.  My concept for tracking these blocks is to add a companyID to each block the first time they get counted.  I'm thinking by adding an Xrecord to the Extension Dictionary.  This companyID would be unique within the project, and I'd keep track of the latest ID used in a project configuration file.
Does this sound like a valid approach?  Do you have any other ideas for this problem?  I'd appreciate any and all thoughts on this.
Regards, Pete

Jeff H

  • Needs a day job
  • Posts: 6150
Re: Is this concept the way to go?
« Reply #1 on: April 15, 2011, 01:46:32 PM »
Welcome to the Swamp.

Sorry if I do not fully understand what the exact issue is, but can you use the block name for id?
If you Wblock a portion of a drawing are you not wanting to count the blocks brought in twice?

dgorsman

  • Water Moccasin
  • Posts: 2437
Re: Is this concept the way to go?
« Reply #2 on: April 15, 2011, 02:19:30 PM »
If you need to uniquely identify a block across multiple drawings, a combination of (effective) block name, attribute values, and/or property values should suffice.  If not you could generate and assign a GUID to the block as part of your insertion routine; when the block is copied the GUID would be retained.  Whether you want convenient/direct access to such an identifier would indicate whether to use an invisible atttribute or a Extension Dictionary/Xrecord data.
If you are going to fly by the seat of your pants, expect friction burns.

try {GreatPower;}
   catch (notResponsible)
      {NextTime(PlanAhead);}
   finally
      {MasterBasics;}

elliottpd

  • Guest
Re: Is this concept the way to go?
« Reply #3 on: April 15, 2011, 04:53:24 PM »
Clarification...
I guess the issue is:  if the same exact physical object (represented by the block) appears in multiple drawings, I want to count it only one time.