License delivery maintenance is planned for Saturday, July 26, between 12:00 and 20:00 CEST. During this time, you may experience outages or limited availability across our services, including BIMcloud SaaS, License Delivery, Graphisoft ID (for customer and company management), Graphisoft Store, and BIMx Web Viewer. More details…
2024-03-20
08:29 AM
- last edited on
2024-09-16
02:59 PM
by
Doreena Deng
Hi team
I am reaching out regarding an issue I encountered while attempting to rotate a column by its own axis using code.
I have utilized the following code snippet:
element.column.head.floorInd = short(storey);
element.column.origoPos = beg;
element.column.coreAnchor = 6;
element.column.relativeTopStory = 0;
element.column.height = height;
element.column.bottomOffset = baseOffset;
element.column.isSlanted = true;
memo.columnSegments[0].assemblySegmentData.isWidthAndHeightLinked = false;
memo.columnSegments[0].assemblySegmentData.nominalWidth = width;
memo.columnSegments[0].assemblySegmentData.nominalHeight = breadth;
element.column.axisRotationAngle = 0.785398;
err = ACAPI_Element_Create(&element, &memo);
Despite setting the axisRotationAngle to 0.785398 (which corresponds to 45 degrees), I am not observing any rotation of the column upon rendering.
However, I can achieve the desired rotation angle through the user interface.
Could you please advise if there is anything I might be missing or if there is an alternative approach to achieve the desired rotation angle programmatically?
Thank you very much for your assistance
Solved! Go to Solution.
2024-05-09
11:06 AM
- last edited on
2024-05-11
05:22 AM
by
Laszlo Nagy
Hi,
The axisRotationAngle should works in latest version (AC27.2.0). If you still meet the problem please try the following code (I just added two lines as first):
element.header.type = API_ColumnID;
GSErrCode err = ACAPI_Element_GetDefaults (&element, &memo);
element.column.head.floorInd = short(storey);
element.column.origoPos = beg;
element.column.coreAnchor = 6;
element.column.relativeTopStory = 0;
element.column.height = height;
element.column.bottomOffset = baseOffset;
element.column.isSlanted = true;
memo.columnSegments[0].assemblySegmentData.isWidthAndHeightLinked = false;
memo.columnSegments[0].assemblySegmentData.nominalWidth = width;
memo.columnSegments[0].assemblySegmentData.nominalHeight = breadth;
element.column.axisRotationAngle = 0.785398;
err = ACAPI_Element_Create(&element, &memo);
2024-05-09
11:06 AM
- last edited on
2024-05-11
05:22 AM
by
Laszlo Nagy
Hi,
The axisRotationAngle should works in latest version (AC27.2.0). If you still meet the problem please try the following code (I just added two lines as first):
element.header.type = API_ColumnID;
GSErrCode err = ACAPI_Element_GetDefaults (&element, &memo);
element.column.head.floorInd = short(storey);
element.column.origoPos = beg;
element.column.coreAnchor = 6;
element.column.relativeTopStory = 0;
element.column.height = height;
element.column.bottomOffset = baseOffset;
element.column.isSlanted = true;
memo.columnSegments[0].assemblySegmentData.isWidthAndHeightLinked = false;
memo.columnSegments[0].assemblySegmentData.nominalWidth = width;
memo.columnSegments[0].assemblySegmentData.nominalHeight = breadth;
element.column.axisRotationAngle = 0.785398;
err = ACAPI_Element_Create(&element, &memo);