Mark,
Here is the simplest solution I could think of. Find the view name "DEFAULT" and normalize the matrix:
----
void Assembly::getDefaultOrientation(ProMatrix orientation) const
{
ProName wName;
ProStringToWstring(wName, "DEFAULT");
ProView defaultView = 0;
ProError status = ProViewNameToView(getProAssembly(), wName, &defaultView);
if (status != PRO_TK_NO_ERROR || !defaultView)
{
throw Error ("DEFAULT view not found.");
}
ProMatrix viewMatrix;
status = ProViewMatrixGet(getProAssembly(), defaultView, viewMatrix);
if (status != PRO_TK_NO_ERROR) throw Error("ProViewMatrixGet()", status);
ProVector xVector = { 0.0, 0.0, 0.0 };
ProVector yVector = { 0.0, 0.0, 0.0 };
ProVector zVector = { 0.0, 0.0, 0.0 };
Pro3dPnt origin = { 0.0, 0.0, 0.0 };
ProUtilTransfToVectors(viewMatrix, xVector, yVector, zVector, origin);
ProUtilVectorNormalize(xVector, xVector);
ProUtilVectorNormalize(yVector, yVector);
ProUtilVectorNormalize(zVector, zVector);
origin[0] = origin[1] = origin[2] = 0.0;
ProUtilVectorsToTransf(xVector, yVector, zVector, origin, orientation);
}
---
Good Luck,
Michael