.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Best object for automatic creation: Xrecord or Xdata

20 REPLIES 20
Reply
Message 1 of 21
CrystalBlueJosh
1069 Views, 20 Replies

Best object for automatic creation: Xrecord or Xdata

I've been trying to find a solution to a problem. We have with moving a lot of our drawings into AutoCAD from another program, and the biggest concern we have is unique identifiers. Basically, we have blocks that each represent a specific object in the drawing that, later, need to be unique for a particular building and ALWAYS be unique. We have an automated program that, once I find a solution for, should take these objects and save their data off into a database somewhere else to track these objects, their properties, ect.

Currently, I'm looking at the handles of these objects and exporting the handles as the unique identifier. However, extra data might need to be added to these at the creating of the objects. Example: someone goes into the drawing and needs to add a new object. The desired effect would be that they draw the object or block out and save it. Once done being drawn, they attach some type of added object to it that would allow them to input data for that object. Either that, or have the data inputed before the can actually draw it.

I need help determining what the best way to store uniquie object data is.

Thanks in advance.
20 REPLIES 20
Message 21 of 21
Anonymous
in reply to: CrystalBlueJosh

Sorry, I really can't make sense of anything you've said.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD
Supporting AutoCAD 2000 through 2011

http://www.acadxtabs.com

Email: string.Format("{0}@{1}.com", "tonyt", "caddzone");

"ljb" wrote in message news:6380082@discussion.autodesk.com...
opening is not a problem, you need file name for opening, true, but checking
is that object in it is "the one" and in situation that we have left it in
(remember, if not pass protected and monitored by our app, anyone can open
dwg and mess with it)
...and so, open same file twice, use dictionary(of filename-string, data
connected to objects)
and try by using handlers - to see when your file is active. but, do not use
doc type, use doc.file name to find
you will see (al least it happened then to me) that file name returned is
the same for both files
only hashcode was different and that was how i knew to distinct files
hence, i concluded that file name is no good. and second, most important
thing - if you have noticed, some people like to have specific name for some
file, and they keep renaming files a lot and in that way, saving file name
in database is no good for tracking specific objects.

well, as i said, my solution is here:
1) to write handle in xrecord
2) to RND number and place it in NOD and then use that number and write it
in xrecord for every single my object

in that way - object when pasted to different file will have wrong that
(RND) number
and when pasted within same file - will have wrong handle

i have never write in NOD anything yet thoug, but, i think it's
strait-forward
so, for me it is solved, and i very much thank you for your time Tony!


"Tony Tanzillo" wrote in message
news:6380015@discussion.autodesk.com...
...
What really puzzles me, is that if you have an external
database that contains references to objects in more
than one DWG file, how else could you possibly open
the file containing one of those objects and access it,
without the filename?

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost