The Global ARCHICAD Community

Stay informed. Get help. Share your knowledge.

Discussions about using GRAPHISOFT's tools (API DevKit) for independent software developers

Moderators: Karl Ottenstein, LaszloNagy, ejrolon, Barry Kelly, gkmethy, MOREH Tamas, Akos Somorjai, Ed Brown, Mihály Palenik, Tibor Lorántfy

By neerson
#275425
Hi,
Could you give me a working example for this?
It's not clear which kind of polygonID mentioned here..


GSErrCode ACAPI_Goodies (
APIAny_PolygonId2SurfaceTypeID,
const API_Element* elem,
const Int32* polygonId,
API_SurfaceTypeID* surfaceType
);

elem
[in] Parameter elem for element type identification. Give elem.header.guid or elem.header.typeId. In case of specify roof elem.roof.roofClass also.
polygonId
[in] Parameter polygonId.
surfaceType
[out] Parameter surfaceType.
User avatar
By Ralph Wessel
#275603
neerson wrote:Hi,
Could you give me a working example for this?
It's not clear which kind of polygonID mentioned here..
GSErrCode ACAPI_Goodies (
APIAny_PolygonId2SurfaceTypeID,
const API_Element* elem,
const Int32* polygonId,
API_SurfaceTypeID* surfaceType
);

I don't have a working example, but I can give a bit more detail. This relevant to the ModelerAPI, where the polygonID is the index of a polygon (face) in a model view. The view will be comprised of 3D bodies, which are comprised of 3D polygons, which are defined by edges that are comprised of a start and end point. If you're iterating through the polygons in a 3D body, this method will tell you the role that face plays in the model, e.g. a wall reference side.