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, rmasaki

By Tomer1
#301048
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?
Last edited by Tomer1 on Wed Aug 28, 2019 12:53 pm, edited 1 time in total.
#301123
Ralph Wessel wrote:
Tue Aug 27, 2019 12:34 pm
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!!
#301152
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.
#301156
Ralph Wessel wrote:
Wed Aug 28, 2019 9:58 am
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!
#301339
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:
  1. Navigator Test's pop-up (at the top) set to Project Map
  2. Go to 'Project name'/Elevations in palette's tree
  3. Create an elevation in 2D view with Elevation Tool (it is in Toolbox)
  4. 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.
#301372
Mihály Palenik wrote:
Wed Sep 04, 2019 1:44 pm
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:
  1. Navigator Test's pop-up (at the top) set to Project Map
  2. Go to 'Project name'/Elevations in palette's tree
  3. Create an elevation in 2D view with Elevation Tool (it is in Toolbox)
  4. 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)