Developer forum
cancel
Showing results for 
Search instead for 
Did you mean: 

PublishTest in Navigator_test not working?

Tomer1
Newcomer
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?
6 REPLIES 6

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

Tomer1
Newcomer
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

Tomer1
Newcomer
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!

Mih_ly 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.

Tomer1
Newcomer
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)

Still looking?

Browse more topics

Back to forum

See latest solutions

Accepted solutions

Start a new discussion!