cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 
2024 Technology Preview Program

2024 Technology Preview Program:
Master powerful new features and shape the latest BIM-enabled innovations

Archicad C++ API
About Archicad add-on development using the C++ API.

[SOLVED] Rotate View

Erenford
Booster
Hello everyone,

Is there a way to create a rotated navigator view thru API? I've tried setting the tranmat API_NavigatorView.tr but nothing happens after I do "APIEnv_NewNavigatorViewID".
2d tranmat of 45 deg. angle:
tmx[0] = 0.707107, tmx[1] = -0.707107, tmx[ 2] = 0.000000, tmx[ 3] = 0.000000
tmx[4] = 0.707107, tmx[5] =  0.707107, tmx[ 6] = 0.000000, tmx[ 7] = 0.000000
tmx[8] = 0.000000, tmx[9] =  0.000000, tmx[10] = 1.000000, tmx[11] = 0.000000
When I checked the values (APIEnv_GetNavigatorViewID) it changes it back to the default angle 0 tranmat
tmx[0] = 1.000000, tmx[1] = -0.000000, tmx[ 2] = 0.000000, tmx[ 3] = 0.000000
tmx[4] = 0.000000, tmx[5] =  1.000000, tmx[ 6] = 0.000000, tmx[ 7] = 0.000000
tmx[8] = 0.000000, tmx[9] =  0.000000, tmx[10] = 1.000000, tmx[11] = 0.000000
So the next thing I did is after creating the view I changed it back to the 45 angle (APIEnv_ChangeNavigatorViewID).

I checked the view again and it retained the tranmat, but when I clicked the view it is still not rotated.

What gives? The 45 angle tranmat above is ok I think since it is working in ACAPI_Database(APIDb_SetZoomID). (which by the way says [out] on the tranmat arg when its supposed to be [in])

Any ideas how to do this?
Thanks.
Archicad 25 5010 INT FULL
Archicad 26 5002 INT FULL
Visual Studio Professional 2019
Win 10 Pro 64-bit
4 REPLIES 4
Tibor Lorantfy
Graphisoft Alumni
Graphisoft Alumni
Hi Erenford,

Thanks for pointing out this issue.
Currently the transformation matrix in API_NavigatorView structure isn't modifiable through API.

I'll add this as feature request and hope we will fix this in the next hot fix.
After that you will be able to modify view's transformation with APIEnv_ChangeNavigatorViewID or in APIEnv_NewNavigatorViewID.

Regards,
Tibor
Erenford
Booster
Ok noted.

Thanks.
Archicad 25 5010 INT FULL
Archicad 26 5002 INT FULL
Visual Studio Professional 2019
Win 10 Pro 64-bit
Erenford
Booster
Hello,

Any news on this? Has this been fixed in AC 18?
Archicad 25 5010 INT FULL
Archicad 26 5002 INT FULL
Visual Studio Professional 2019
Win 10 Pro 64-bit
Tibor Lorantfy
Graphisoft Alumni
Graphisoft Alumni
Erenford wrote:
Any news on this? Has this been fixed in AC 18?
Yes, we fixed this in AC18 (build 4601), please check for updates!