Revit API Forum
Welcome to Autodeskā€™s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results forĀ 
ShowĀ Ā onlyĀ  | Search instead forĀ 
Did you mean:Ā 

Ribbon Panel items are disabled when 3d view is activated.

9 REPLIES 9
SOLVED
Reply
Message 1 of 10
Anonymous
1029 Views, 9 Replies

Ribbon Panel items are disabled when 3d view is activated.

Hi,

I am new to Revit. I have created a new ribbon panel and added some items.

When I switch to a 3D View the ribbon panel items are disabled.

Why items are disabled ?

How can I enable them in all type of views till there is a active ui document ?

9 REPLIES 9
Message 2 of 10
Anonymous
in reply to: Anonymous

Hey,


I'm pretty sure they should not be disabled just because you switched to 3D view.
Maybe you have some other command\transaction running or a messagebox\window open?
Press escape once or twice and check if there is no open windows in the background from revit or revit addins.

Message 3 of 10
Anonymous
in reply to: Anonymous

I have tried pressing escape twice but it did not have any effect.

I am using Revit 2017.Revit Ribbon disabled.gif

Message 4 of 10
RPTHOMAS108
in reply to: Anonymous

Hard for anyone to say if you share no code indicating what you have done to create the items on the ribbon.

 

e.g. have you implemented IExternalCommandAvailability at all if so how?

Message 5 of 10
Anonymous
in reply to: RPTHOMAS108

For login button there is no AvailabilityClassName.

But for other button there is. 

public bool IsCommandAvailable(UIApplication applicationData, CategorySet selectedCategories)
{
return UserData.Instance.LoggedIn && (applicationData.ActiveUIDocument != null);
}

Other buttons are available when user is logged in and there is some active document available.

Message 6 of 10
Anonymous
in reply to: Anonymous

Same plugin works in Revit 2018 with no code changes.

Ribbon panel items are not disabled when 3d view is activated.

Revit2018.png

Message 7 of 10
Revitalizer
in reply to: Anonymous

Hi,

 

in the Revit 2018 SDK, there is a "Revit Platform API Changes and Additions.docx".

On the very first page, it says:

"Most commands allowed in 3D orthographic views are now also allowed in perspective views."

 

I want to add that this API addition just reflects the changed UI behavior, from 2017 to 2018.

So it is not a problem but works as expected.

 

Revitalizer

 

 




Rudolf Honke
Software Developer
Mensch und Maschine





Message 8 of 10
Anonymous
in reply to: Revitalizer

So we cannot enable the ribbon panel in Revit 2017 when current view is 3D view ?

Message 9 of 10
Revitalizer
in reply to: Anonymous

Hi,

 

basic knowledge of the product can answer many API questions.

In nearly all cases, the rule is:

If you cannot do it via UI, it cannot be done via API, too.

 

Revitalizer




Rudolf Honke
Software Developer
Mensch und Maschine





Message 10 of 10
Anonymous
in reply to: Anonymous

We are currently experiencing the same issue. May I know what the alternative solution was? Did you end up having to not using IExternalCommandAvailability implementations on the ribbon items?

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report