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

PublishTest in Navigator_test not working?

Anonymous
Not applicable
Hello,

I am trying to use publishtest from Navigator_test example. It is not working for me and I saw that the first If in it false - so it really shouldn’t work.. the question is why the “selected” variable isn’t valid..

Thanks in advance!

Edit: I understood that I should use this example with the palette.. but does anyone have any idea of what should the “update tree” void in this example do?
7 REPLIES 7
Ralph Wessel
Mentor
Just to get the obvious out of the way first, do you have something relevant selected in the Navigator palette when you test this function?
Ralph Wessel BArch
Anonymous
Not applicable
Ralph wrote:
Just to get the obvious out of the way first, do you have something relevant selected in the Navigator palette when you test this function?
Yes, I have a publisher set selected. As I said, I also tried to print something after if(selected!=DG_TVI_NONE) and nothing print, so it didn’t even got something vaild into “selected” variable

Update:
I am trying to use PublishTest function on Archicad’s navigator and not on the navigator window of the example, but I’m unable to get guid of navigator. How do I do that?

Thanks!!
Ralph Wessel
Mentor
I think that's likely to be the wrong approach. If I remember correctly, that example builds its own palette showing the navigator hierarchy, so the tree view and displayed items all belong to that add-on. I don't believe you can use that approach with palettes that belong to ARCHICAD, and I'm not aware of an API call to tell you which items are selected either. Possibly someone from GS might have a suggestion.
Ralph Wessel BArch
Anonymous
Not applicable
Ralph wrote:
I think that's likely to be the wrong approach. If I remember correctly, that example builds its own palette showing the navigator hierarchy, so the tree view and displayed items all belong to that add-on. I don't believe you can use that approach with palettes that belong to ARCHICAD, and I'm not aware of an API call to tell you which items are selected either. Possibly someone from GS might have a suggestion.
Yea I also guess my approach was wrong.

Do you have an idea of what should the “update tree” void do? It doesn’t update anything by what I’m seeing..
Thanks!
Mihaly Palenik
Graphisoft
Graphisoft
Hello,

do you think static void UpdateTree function in NavigatorPalette.cpp? If you do then this function update the tree in Navigator Test palette. You can see it by yourself:
  • Navigator Test's pop-up (at the top) set to Project Map
  • Go to 'Project name'/Elevations in palette's tree
  • Create an elevation in 2D view with Elevation Tool (it is in Toolbox)
  • If you check the palette's tree you don't see the new elevation only if you click on Update button
I hope my answer is useful for you.
Anonymous
Not applicable
Mihály wrote:
Hello,

do you think static void UpdateTree function in NavigatorPalette.cpp? If you do then this function update the tree in Navigator Test palette. You can see it by yourself:
  • Navigator Test's pop-up (at the top) set to Project Map
  • Go to 'Project name'/Elevations in palette's tree
  • Create an elevation in 2D view with Elevation Tool (it is in Toolbox)
  • If you check the palette's tree you don't see the new elevation only if you click on Update button
I hope my answer is useful for you.
Yep, I now understand what it should do. Thanks!!
I’m looking for a way to update the layout book through API (like right-clicking layout book and choosing update)

"I’m looking for a way to update the layout book through API"

 

I am searching for the same solution.  What API calls did you end up using?

Thanks for any help...

chris

Chris Gilmer
Intel i9-12950HX CPU @ 2.30GHz, 16 cores
NVIDIA GeForce RTX 3080
48.0 GB RAM
Windows 10 Pro 64-bit

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!