SOLVED!
Extract graphical data from various elements
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2018-06-25
11:20 AM
- last edited on
‎2024-09-09
11:00 AM
by
Doreena Deng
‎2018-06-25
11:20 AM
Hi !
I've been recently tasked with the construction of a written report created programatically from data in the Archicad API.
As I've went through the doors and windows export, I've also been asked to export graphical data, such as what is available in here :
Ideally, if I could export them to a standard image format (jpg, png), that would solve my problem.
I've been digging around in the API_WindowType to see if I could find relevant data, but all I could find was some "pen data" in API_OpeningBase, that I don't know how to make use of.
I also digged around a bit in GDL documentation, but it looks like it is used to create new objects from scripting, not to export graphical data of already existing elements.
Can someone help me out on this ?
Thanks !
I've been recently tasked with the construction of a written report created programatically from data in the Archicad API.
As I've went through the doors and windows export, I've also been asked to export graphical data, such as what is available in here :
Ideally, if I could export them to a standard image format (jpg, png), that would solve my problem.
I've been digging around in the API_WindowType to see if I could find relevant data, but all I could find was some "pen data" in API_OpeningBase, that I don't know how to make use of.
I also digged around a bit in GDL documentation, but it looks like it is used to create new objects from scripting, not to export graphical data of already existing elements.
Can someone help me out on this ?
Thanks !
Solved! Go to Solution.
1 ACCEPTED SOLUTION
Accepted Solutions
Solution
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2018-06-27 04:23 PM
‎2018-06-27
04:23 PM
Hi again !
I experimented a bit around with ACAPI_Element_ShapePrims, but as noted in ACAPI_Librpart_shapeprims, the 2D data you receive using this is the floor, "view from above" representation of the element.
So I tinkered around, found ACAPI_Element_Get3D, and had other, more pressing work to do, so I couldn't really experiment too much and try to draw the 3D representation myself.
But, I got reaaally lucky while rummaging around in the DG_Test example : as I was experimenting around, I found ACAPI_​Element_​GetVisualOverriddenImage in the DG_Test example !
The representation given by this function is exactly what I needed, so i'll be attaching a picture of what an extracted image looks like for future reference.
Consider this solved !
I experimented a bit around with ACAPI_Element_ShapePrims, but as noted in ACAPI_Librpart_shapeprims, the 2D data you receive using this is the floor, "view from above" representation of the element.
So I tinkered around, found ACAPI_Element_Get3D, and had other, more pressing work to do, so I couldn't really experiment too much and try to draw the 3D representation myself.
But, I got reaaally lucky while rummaging around in the DG_Test example : as I was experimenting around, I found ACAPI_​Element_​GetVisualOverriddenImage in the DG_Test example !
The representation given by this function is exactly what I needed, so i'll be attaching a picture of what an extracted image looks like for future reference.
Consider this solved !
4 REPLIES 4
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2018-06-25 04:37 PM
‎2018-06-25
04:37 PM
The 2D/3D rendering of GDL objects is dynamically generated on demand and varies according to parameter values and model view options etc. Therefore, there is no static image embedded in the object (apart from the object icon).
You can ask ARCHICAD to break down the illustration of an element into 2D primitives withACAPI_Element_ShapePrims – that could be the basis for rendering an image to export.
You can ask ARCHICAD to break down the illustration of an element into 2D primitives with
Ralph Wessel BArch
Central Innovation
Central Innovation
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2018-06-25 04:58 PM
‎2018-06-25
04:58 PM
Nice, I couldn't find this when I was searching, but after reading a bit about it, it looks like I can do something with it.
I'll come back to this thread once a huge problem arises / I've finished this, I'll probably make something to draw the primitives in a .png, so I probably will dump it here once it is done
Thanks for your help !
I'll come back to this thread once a huge problem arises / I've finished this, I'll probably make something to draw the primitives in a .png, so I probably will dump it here once it is done
Thanks for your help !
Solution
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2018-06-27 04:23 PM
‎2018-06-27
04:23 PM
Hi again !
I experimented a bit around with ACAPI_Element_ShapePrims, but as noted in ACAPI_Librpart_shapeprims, the 2D data you receive using this is the floor, "view from above" representation of the element.
So I tinkered around, found ACAPI_Element_Get3D, and had other, more pressing work to do, so I couldn't really experiment too much and try to draw the 3D representation myself.
But, I got reaaally lucky while rummaging around in the DG_Test example : as I was experimenting around, I found ACAPI_​Element_​GetVisualOverriddenImage in the DG_Test example !
The representation given by this function is exactly what I needed, so i'll be attaching a picture of what an extracted image looks like for future reference.
Consider this solved !
I experimented a bit around with ACAPI_Element_ShapePrims, but as noted in ACAPI_Librpart_shapeprims, the 2D data you receive using this is the floor, "view from above" representation of the element.
So I tinkered around, found ACAPI_Element_Get3D, and had other, more pressing work to do, so I couldn't really experiment too much and try to draw the 3D representation myself.
But, I got reaaally lucky while rummaging around in the DG_Test example : as I was experimenting around, I found ACAPI_​Element_​GetVisualOverriddenImage in the DG_Test example !
The representation given by this function is exactly what I needed, so i'll be attaching a picture of what an extracted image looks like for future reference.
Consider this solved !
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2018-07-13 05:24 PM
‎2018-07-13
05:24 PM
Yes, that's exactly the function I would recommend; it saves your from all the hassle 
Best, Akos

Best, Akos