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

How to get sightPtr

Anonymous
Not applicable
Hi guys.

I would like to export model from ARCHICAD. Different from ModelAccess_Test module which triggers the functions by "save", the requirement is to click the button on the menu. However, if I install menu handler, I could not get Modeler::SightPtr like Install_FileTypeHandler3D. I was wondering how to get Modeler::SightPtr in some other ways.

Thanks in advance.
1 ACCEPTED SOLUTION

Accepted Solutions
Solution
Tibor Lorantfy
Graphisoft Alumni
Graphisoft Alumni
Hi scandi,

If you register a new menu item from an Add-On by default it will be enabled (not gray) only when a 2D view (floorplan) is active.
But you can enable your menu items under any other view types if you modify the resource string of your menu item in your GRC file. Simply add ^E3 (= Enable in 3D) after the string title of your menu item into the GRC and it won't be gray and you will be able to use ACAPI_3D_GetCurrentWindowSight:
'STR#' 32500 "My menu strings" {
/* [  1] */     "My Main Menu"
/* [  2] */         "My Menu^E3"
}
See more informations here: http://archicadapi.graphisoft.com/documentation/required-resources

View solution in original post

8 REPLIES 8
Anonymous
Not applicable
I use ACAPI_3D_GetCurrentWindowSight but when the button is gray in 3D window...When I click it in the non-3D window, ACAPI_3D_GetCurrentWindow returns bad window.
Anonymous
Not applicable
Could anybody be so kind as to help me please?
Solution
Tibor Lorantfy
Graphisoft Alumni
Graphisoft Alumni
Hi scandi,

If you register a new menu item from an Add-On by default it will be enabled (not gray) only when a 2D view (floorplan) is active.
But you can enable your menu items under any other view types if you modify the resource string of your menu item in your GRC file. Simply add ^E3 (= Enable in 3D) after the string title of your menu item into the GRC and it won't be gray and you will be able to use ACAPI_3D_GetCurrentWindowSight:
'STR#' 32500 "My menu strings" {
/* [  1] */     "My Main Menu"
/* [  2] */         "My Menu^E3"
}
See more informations here: http://archicadapi.graphisoft.com/documentation/required-resources
Anonymous
Not applicable
Thank you Tibor! I got it.
Anonymous
Not applicable
Tibor wrote:
Hi scandi,

If you register a new menu item from an Add-On by default it will be enabled (not gray) only when a 2D view (floorplan) is active.
But you can enable your menu items under any other view types if you modify the resource string of your menu item in your GRC file. Simply add ^E3 (= Enable in 3D) after the string title of your menu item into the GRC and it won't be gray and you will be able to use ACAPI_3D_GetCurrentWindowSight:
'STR#' 32500 "My menu strings" {
/* [  1] */     "My Main Menu"
/* [  2] */         "My Menu^E3"
}
See more informations here: http://archicadapi.graphisoft.com/documentation/required-resources
Hi Tibor.

Could you please tell me how to enable the button only in 3D window please? Is there a disable-2D string?

Thanks in advance!
Anonymous
Not applicable
scandi wrote:
Tibor wrote:
Hi scandi,

If you register a new menu item from an Add-On by default it will be enabled (not gray) only when a 2D view (floorplan) is active.
But you can enable your menu items under any other view types if you modify the resource string of your menu item in your GRC file. Simply add ^E3 (= Enable in 3D) after the string title of your menu item into the GRC and it won't be gray and you will be able to use ACAPI_3D_GetCurrentWindowSight:
'STR#' 32500 "My menu strings" {
/* [  1] */     "My Main Menu"
/* [  2] */         "My Menu^E3"
}
See more informations here: http://archicadapi.graphisoft.com/documentation/required-resources
Hi Tibor.

Could you please tell me how to enable the button only in 3D window please? Is there a disable-2D string?

Thanks in advance!
I find it! "^D2" will work. Maybe D2 means "Disable in 2D".
Ralph Wessel
Mentor
scandi wrote:
I find it! "^D2" will work. Maybe D2 means "Disable in 2D".
Follow the link Tibor gave you - it provides all the documentation for the menu resources: http://archicadapi.graphisoft.com/documentation/required-resources
Ralph Wessel BArch
Software Engineer Speckle Systems
Anonymous
Not applicable
Ralph wrote:
scandi wrote:
I find it! "^D2" will work. Maybe D2 means "Disable in 2D".
Follow the link Tibor gave you - it provides all the documentation for the menu resources: http://archicadapi.graphisoft.com/documentation/required-resources
Thank you. I didn't notice that link.

Didn't find the answer?

Check other topics in this Forum

Back to Forum

Read the latest accepted solutions!

Accepted Solutions

Start a new conversation!