Shared Coordinate System - Definition

Shared Coordinate System - Definition

Dale.Bartlett
Collaborator Collaborator
4,719 Views
21 Replies
Message 1 of 22

Shared Coordinate System - Definition

Dale.Bartlett
Collaborator
Collaborator

I am receiving the (common) message "document and the imported instance do not share the same coordinate system". I am curious as to how this is registered in the Revit database. A coordinate system is simply an origin (XYZ) and a rotation. Given that the coord system can be passed ("acquired") from model to model, how is it defined or different? How does Revit know that it is not the same system, or in fact, what constitutes the same? I am not referring to named locations.




______________
Yes, I'm Satoshi.
0 Likes
Accepted solutions (1)
4,720 Views
21 Replies
Replies (21)
Message 2 of 22

Anonymous
Not applicable
0 Likes
Message 3 of 22

jeremytammik
Autodesk
Autodesk

Hear, hear! My sentiments entirely.



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes
Message 4 of 22

Dale.Bartlett
Collaborator
Collaborator

Both, Thanks for responding, but I don't think a throw-away comment to check Google is necessarily helpful. I understand Shared Coordinates, and researched copiously before posting here. 

My question was an API one specifically regarding how the Shared Coordinates are recorded in the Revit database. From my testing, if two Revit models acquire coordinates from different source (AutoCAD) files, then the Revit files will not link to each other by Shared Coordinates ("The document and the imported instance do not share the same coordinate system"). Given that acquiring coordinates should simply comprise adding a new origin and rotation relative to Revit's native origin and rotation, then some other factor defines "same coordinate system".

This is text from the link you posted. That is all clear and logical, however the process of acquiring coordinates clearly also acquires some additional identifier.       

When you acquire coordinates from a linked Revit project, the shared coordinates of the linked project become the shared coordinates of the host project, based on the position of the linked project instance in the host project. There is no change to the host project's internal coordinates. The host project also acquires True North from the linked project. The origin of the linked project's shared coordinates becomes the origin of the host project's shared coordinates.   

I am very happy to be corrected, but I have been unable to find any reference as to what constitutes "shared" when it comes to coordinates. It may be that a GUID is used in a similar way to Shared Parameters, but where and how? Many thanks, Dale. 

 




______________
Yes, I'm Satoshi.
0 Likes
Message 5 of 22

Dale.Bartlett
Collaborator
Collaborator

PS I have waded through Revit Lookup>Snoop DB, and whilst there are references to Base Point and IsShared, I cannot find the determining factor that links common Shared Coordinate project. Still looking...




______________
Yes, I'm Satoshi.
0 Likes
Message 6 of 22

jeremytammik
Autodesk
Autodesk

Dear Dale,

 

Very sorry indeed for the "throw-away" comment. Please excuse that.

 

Otoh, please also note that even such a "throw-away" comment does cost the effort of a few key strokes.

 

I.e., please also understand the importance of mentioning a teeny weeny little bit about the research you have already made, to avoid these kind of comments and the wasted effort on both sides.

 

I am pretty sure that the information you are after is easily accessible programmatically.

 

Does this discussion help?

 

http://thebuildingcoder.typepad.com/blog/2015/08/internal-vs-base-point-and-link-to-host-coordinates...

 

If not, please let me know and I'll continue researching.

 

If that becomes necessary, a really minimal reproducible case will help:

 

http://thebuildingcoder.typepad.com/blog/about-the-author.html#1b

 

That will also be required if we need to ask the development team for help.

 

Thank you!

 

Cheers

 

Jeremy



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes
Message 7 of 22

Anonymous
Not applicable

Hello Dale,

 

I misunderstood your post and thought you where asking for the way the shared coordinates work in revit, so excuses for that. Unfortunately I haven't done anything with this in the API, so you best go with Jeremy's suggestions 🙂 

0 Likes
Message 8 of 22

Dale.Bartlett
Collaborator
Collaborator

Hi All, No apologies necessary, I should have been more specific. Jeremy, your material is helpful in terms of determining where the origins are relative to each other for use in transformations etc. Also it can be used to determine whether the Survey Origin and Project Origin are the same. What I cannot determine is what property defines two "Shared" coordinate systems as being incompatible. As far as reproducible code, I don't have anything but am happy to share results eventually. Effectively, whatever function Revit uses to arrive at the message: "The document and the imported instance do not share the same coordinate system" is the same test that I wish to run. Ultimately, I intend setting the Survey Origin (Shared Coordinates) programmatically, but will also need to set the flag so that multiple models will recognise this as the "same coordinate system". Clear? Jeremy, I know you are incredibly busy drinking beer and chasing super-models at AU, so don't burn out over this one... Dale     




______________
Yes, I'm Satoshi.
0 Likes
Message 9 of 22

jeremytammik
Autodesk
Autodesk

Dear Dale,

 

Just for you, in spite of all the supermodels and super business, I passed on the question to the Revit development team.

 

I hope and trust they'll come up with something for you.

 

Maybe somebody (me?) can rememeber to bring up this question at the Revit API panel this afternoon at five, in session SD10181 Revit API Expert Roundtable: Open House on the Factory Floor.

 

Then it would make its way into the session notes for posterity as well  🙂

 

Cheers

 

Jeremy



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

Message 10 of 22

Dale.Bartlett
Collaborator
Collaborator

Your sacrifice is very much appreciated. Dale




______________
Yes, I'm Satoshi.
0 Likes
Message 11 of 22

Dale.Bartlett
Collaborator
Collaborator

Hi Jeremy,

Did you remember to raise at SD10181 Revit API Expert Roundtable: Open House on the Factory Floor?

Dale

 




______________
Yes, I'm Satoshi.
0 Likes
Message 12 of 22

jeremytammik
Autodesk
Autodesk

Dear Dale,

 

I raised the issue with the entire Revit development team on December 1 and did not hear back from them yet.

 

I now re-prompted for a reply.

 

Cheers,

 

Jeremy



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes
Message 13 of 22

jeremytammik
Autodesk
Autodesk

Dear Dale,

 

I heard back from the Revit development team. They say:

 

We don't currently expose this knowledge to the API.

 

Two files have compatible coordinates if:

  1. The 'acquire coordinates' or 'publish coordinates' commands were used, or
  2. One file was made from the other, using Save As, for example. It's not enough to make both files from the same template.


If you want to make files with compatible coordinates, you can use method two.

 

If you want to know if two arbitrary files have compatible coordinates, there's nothing you can do from the API right now.

 

That said, there may of course exist some possible workaround that nobody knows about.

 

Would you like me to raise a wish list item for you?

 

Cheers

 

Jeremy



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

Message 14 of 22

Dale.Bartlett
Collaborator
Collaborator

Hi Jeremy,

I appreciate your efforts but remain astounded at the number of black-holes in the Revit API. Given the simplicity of the concept of a coordinate system, this is a real impediment to properly and efficiently coordinating Revit models. If two models are supplied by different parties with no knowledge of the source of the Acquired Coordinates, those models are deemed geometrically incompatible by Revit with no further explanantion. Making them again compatible is time-consuming and potentially error-inducing, not to mention, not documented or widely known. I would appreciate your raising this as a wish item, but don't hold much hope given others that have been pending for years. One last point, if it is not possible to edit the "Incompatible Coordinate" flag, is it possible to catch it? 

Thanks again and apologies for the rant..

Dale

   




______________
Yes, I'm Satoshi.
0 Likes
Message 15 of 22

Dale.Bartlett
Collaborator
Collaborator

One last question: Is it possible to retreive the name of the file from which the coordinates have been acquired? This would be a help. Dale 




______________
Yes, I'm Satoshi.
0 Likes
Message 16 of 22

jeremytammik
Autodesk
Autodesk
Accepted solution

Dear Dale,

 

Sorry for the holes in the API!

 

I submitted the wish list item CF-3730 [API wish: determine 'doc and imported instance do not share coordinate system'] for you and also passed ohn your question about retreiving the name of the file from which the coordinates have been acquired.

 

I hope this helps.

 

Cheers

 

Jeremy



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

Message 17 of 22

Dale.Bartlett
Collaborator
Collaborator
Thanks again. I will mark it as resolved and let's all get on with our lives. Dale



______________
Yes, I'm Satoshi.
0 Likes
Message 18 of 22

Dale.Bartlett
Collaborator
Collaborator
Hi Jeremy, Did you get any response to : "and also passed on your question about retrieving the name of the file from which the coordinates have been acquired." - Dale



______________
Yes, I'm Satoshi.
0 Likes
Message 19 of 22

Dale.Bartlett
Collaborator
Collaborator

bump...

Specifically I need to be able to determine which file was used to create a "compatible coordinate system". Thanks Dale




______________
Yes, I'm Satoshi.
0 Likes
Message 20 of 22

Dale.Bartlett
Collaborator
Collaborator

double bump: Any response from the dev team? Dale




______________
Yes, I'm Satoshi.
0 Likes