Is Context Menu accessible through API ??

Is Context Menu accessible through API ??

Anonymous
Not applicable
4,174 Views
4 Replies
Message 1 of 5

Is Context Menu accessible through API ??

Anonymous
Not applicable

Hi All,

 

I'm new to  Addin development and need some assistance in knowing if the context Menu is accessible through the Revit API.

I'm  developing an  Add-in that needs to use some of the methods from the context menu (Apply dependent view )Addin needs copying the View plans with dependent views .I'm able to create the viewplans but each plan  is created as an independent view plan( unable to create the Primary- dependent relation ) .Is this possible using the API. Are they accesible throught the API.?? I also tried accessing the built in parameter- VIEW_DEPENDENCY thorugh API which is a read-Only property but couldn't proceed further.

 

Please find the screen shot for further clarity..

 

Thanks in advance.

Accepted solutions (1)
4,175 Views
4 Replies
Replies (4)
Message 2 of 5

jeremytammik
Autodesk
Autodesk
Accepted solution

Dear DMadhuri,

The Revit API does not provide any access to the context menu. You will have to use the Windows API or .NET Framework functionality to access that, and it will be unsupported and at your own risk, as described in these threads:

http://thebuildingcoder.typepad.com/blog/automation

http://thebuildingcoder.typepad.com/blog/win32

Best regards, Jeremy.
--
Jeremy Tammik
Autodesk Developer Network -- http://www.autodesk.com/joinadn
The Building Coder -- http://thebuildingcoder.typepad.com




Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

Message 3 of 5

Anonymous
Not applicable

Hi Jeremy,

 

Glad that you have answered this .. I'll surely give that a try but is there any workaround for creating  a parent -child relation between viewplans becasue creating each Viewplan programatically creates each plan as an independent and I dont find any option availabe ? I'm assuming to be limitiation so far..please clarify

 

I'm not really very sure of what are the possible things throguh the API and what aren't as i'm new to programming in Revit

Is there any option to know the limitations of the API before taking a new request for development.( any URL/Blog ) ?

 

Thanks

Madhuri

0 Likes
Message 4 of 5

jeremytammik
Autodesk
Autodesk

Dear Madhuri,

I don't know of any way to define that relationship.

Sure, there is lots of documentation on what you can do with the Revit API. Look at all the material pointed at here:

http://thebuildingcoder.typepad.com/blog/2011/10/getting-started-with-the-revit-2012-api.html

The Revit SDK with the Revit API help file RevitAPI.chm and the developer guide is the most important starting point, and the online wikihelp:

http://thebuildingcoder.typepad.com/blog/2011/11/revit-api-developer-guide-on-autodesk-wikihelp.html

I am not aware of any list of what you cannot do. The problem with such a list is that it would be absolutely infinite, so it cannot exist  🙂

Cheers, Jeremy.



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

Message 5 of 5

Anonymous
Not applicable

Thanks Jeremy for the quick answer.....and your time !!!!!!!!

 

 

 

 

0 Likes