We value your input! Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey
2024-01-16 09:58 AM - last edited on 2024-09-17 01:08 PM by Doreena Deng
Windows10 Archicad26 APIDevKit 26.3000
beamSegment not has 'extrusionSurfaceMaterial' property
then beam with custum section can't change 'materialsChained' property false to true.
How to change 'materialsChained' property false to true with beam with custum section in C++?;
Solved! Go to Solution.
2024-06-12 08:11 AM
No, you're right, it's a limitation of the current SDK. I don't know whether an updated SDK can be released for AC27, but it will be solved in AC28 SDK officially.
HTH
2024-01-23 05:35 AM
It seems that "Do_TestMaterialChaining" in the SDK sample "Element_Test" is not working properly.
Is this a misunderstanding on my part?
It would be helpful if you could at least give me a hint.
2024-01-26 10:17 AM
Hi HKM,
Yes extrusionSurfaceMaterial is only available for Column Segments.
But Beam Segments can actually override each side separately, that's why there are all the different sides available as overrides (leftMaterial, rightMaterial....).
See the documentation of API_BeamSegmentType. This also matches the options in the beam segment settings.
And there is a materialsChanged property in beam segments that chains or unchains the 5 different sides overrides of the beam.
So to my understanding also the Do_TestMaterialChaining example is correct. (It's a bit weird because it "inverts" the chain instead of setting it to a fixed "chained" or "unchained" value)
Hope that helps,
Bernd
2024-01-27 09:24 AM - last edited on 2024-01-31 12:55 AM by Laszlo Nagy
Custom section beams do not match description.
For custom sections, 'Extruded material'(translated from Japanese) is displayed at the top of the material.
2024-02-06 09:46 AM - last edited on 2024-02-10 02:28 AM by Laszlo Nagy
Check before and after segmentation.
use "Do_TestMaterialChaining()" of SDK Example "Element_Test".
Archicad 22 (before segmentation)
modified to "overridden = true" for all materials(side/bottom/left/right/right/top).
case API_BeamID:
ACAPI_ELEMENT_MASK_SET (mask, API_BeamType, materialsChained);
ACAPI_ELEMENT_MASK_SET (mask, API_BeamType, sideMat);
chainingValue = &element.beam.materialsChained;
element.beam.sideMat.attributeIndex = 19;
element.beam.sideMat.overridden = true;
ACAPI_ELEMENT_MASK_SET (mask, API_BeamType, botMat);
element.beam.botMat.attributeIndex = 19;
element.beam.botMat.overridden = true;
ACAPI_ELEMENT_MASK_SET (mask, API_BeamType, leftMat);
element.beam.leftMat.attributeIndex = 19;
element.beam.leftMat.overridden = true;
ACAPI_ELEMENT_MASK_SET (mask, API_BeamType, rightMat);
element.beam.rightMat.attributeIndex = 19;
element.beam.rightMat.overridden = true;
ACAPI_ELEMENT_MASK_SET (mask, API_BeamType, topMat);
element.beam.topMat.attributeIndex = 19;
element.beam.topMat.overridden = true;
//--------------------------------
Result
Extrusion side surface material is chenged
//--------------------------------
Archicad24 (after segmentation)
modified to "overridden = true" for all materials(left/right/top/bottom/ends).
case API_BeamID:
BNZeroMemory (&memo, sizeof (API_ElementMemo));
err = ACAPI_Element_GetMemo (element.header.guid, &memo, APIMemoMask_BeamSegment);
for (USize idx = 0; idx < element.beam.nSegments; ++idx) {
chainingValue = &memo.beamSegments[idx].materialsChained;
memo.beamSegments[idx].leftMaterial.attributeIndex = 19;
memo.beamSegments[idx].leftMaterial.overridden = true;
memo.beamSegments[idx].rightMaterial.attributeIndex = 19;
memo.beamSegments[idx].rightMaterial.overridden = true;
memo.beamSegments[idx].topMaterial.attributeIndex = 19;
memo.beamSegments[idx].topMaterial.overridden = true;
memo.beamSegments[idx].bottomMaterial.attributeIndex = 19;
memo.beamSegments[idx].bottomMaterial.overridden = true;
memo.beamSegments[idx].endsMaterial.attributeIndex = 19;
memo.beamSegments[idx].endsMaterial.overridden = true;
*chainingValue = !*chainingValue;
}
API_Element maskElem;
ACAPI_ELEMENT_MASK_CLEAR (maskElem);
err = ACAPI_Element_Change (&element, &maskElem, &memo, APIMemoMask_BeamSegment, true);
Result
Extrusion side surface material is not chenged
2024-02-13 03:15 PM
Does anyone other than me have this problem?
Or am I misunderstanding something?
Any advice would be helpful.
2024-06-07 09:53 AM
Hi,
If your problem is you're not able to change the profile beam side material with API, then it's true.
HTH.
2024-06-12 03:55 AM
Thank you.
So does that mean I'm wrong?
Or is this a bug in the SDK that will be fixed?
2024-06-12 08:11 AM
No, you're right, it's a limitation of the current SDK. I don't know whether an updated SDK can be released for AC27, but it will be solved in AC28 SDK officially.
HTH