Message 1 of 3
convert ObjectId to MapObjectId
Not applicable
09-17-2008
02:54 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I basically need to iterate through every single objects in my drawings (the drawing project and attached drawings). Then I need to keep in memory the ID of each objects. It seems that MapObjectId is what I should use (instead of ObjectId which is not persistent through load/unload of attached drawings).
I have to ways to iterate through my objects:
1) Iterate on the project drawing's objects. But then how am I supposed to convert ObjectId to MapObjectID ? It seems that I need to know which drawing the object is coming from. Is there a way to obtain an object's origin ? or directly convert an ObjectId to a MapObjectId (with some static methods) ?
2) Iterate on each attached drawings and for each objects build a MapObjectId (via MapObjectId.Init() function). Then I still need to iterate through the project drawing's objects. The problem is I will get all attached objects one more time. This obviously a huge performance issue. Is there a way to "avoid" attached objects and only iterate through project's drawing's objects ?
TIA
I basically need to iterate through every single objects in my drawings (the drawing project and attached drawings). Then I need to keep in memory the ID of each objects. It seems that MapObjectId is what I should use (instead of ObjectId which is not persistent through load/unload of attached drawings).
I have to ways to iterate through my objects:
1) Iterate on the project drawing's objects. But then how am I supposed to convert ObjectId to MapObjectID ? It seems that I need to know which drawing the object is coming from. Is there a way to obtain an object's origin ? or directly convert an ObjectId to a MapObjectId (with some static methods) ?
2) Iterate on each attached drawings and for each objects build a MapObjectId (via MapObjectId.Init() function). Then I still need to iterate through the project drawing's objects. The problem is I will get all attached objects one more time. This obviously a huge performance issue. Is there a way to "avoid" attached objects and only iterate through project's drawing's objects ?
TIA