Quantcast
Channel: All Revit API Forum posts
Viewing all articles
Browse latest Browse all 66666

Re: How to manipulate the "Project Browser" when programmatically acti

$
0
0

Mustafa,

Thanks so much for that link.  It truly is a goldmine.  I am already able to access the Revit UI and get some rudimentary info from it.  

 

However, I'm unable to make the jump from the top-level menu items, to the submenu items like the Project Browser.  Maybe I'm doing something wrong, but whenever i use GetSubMenu, it always returns a zero result.  I use the GetMenu and the GetWindow which will give me the Revit UI.  However, when I use submenu commands, it is always zero.  Here is a simplified version:

 

     IntPtr RevitAppNumber = RevitWndHandle(uiApp.ActiveUIDocument.Document.Title.ToString());
     IntPtr GGG = GetMenu(RevitAppNumber);
     IntPtr LLL0 = GetSubMenu(GGG, 0);

 

 

RevitWndHandle is a subroutine that I wrote up to get the handle.  

 

No matter what number I put in for the GetSubMenu, it's always a null.

 

But, the MenuItemCount is more than 1.

 

     IntPtr mainMenu = GetMenu(RevitAppNumber);
     IntPtr fileMenu = GetSubMenu(mainMenu, 0);
     uint itemIndex = (uint) GetMenuItemCount(fileMenu);

 

This returns a MASSIVE itemIndex like 1515123412342.  Which is also weird.  I'm new to this WinAPI stuff, so any advice you could give would help immensely.  

 

 

.

.

.

.


Viewing all articles
Browse latest Browse all 66666

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>