Announcement

Collapse
No announcement yet.

External Commands Disabled During Certain Views

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    External Commands Disabled During Certain Views

    OK. I admit I'm a noob. I have about 3 days experience with RAC, trying to program the API.

    I have successfully created and registered the manifests for both an external command and an external application which creates a ribbon panel to execute the same command.

    Before my project opens, my external command and ribbon are enabled.
    I used the: [Transaction(TransactionMode.Manual)]
    [Regeneration(RegenerationOption.Manual)]
    attributes as in the walkthrough.

    When my project opens, the default view is a schedule view (of doors). My external command and ribbon are disabled.

    It is not until I create a 3d view that my external command and ribbon become enabled again.

    I implemented the IExternalCommandAvailability interface to always return true (for now). This code does not even execute when I click on the add-ins menu to try to execute my external command when only the schedule view is displayed.

    I would like for my external command to be executable at any point in the project life cycle - i.e when my project first opens up displaying only a scheddule view.

    My Manifest file for the external command is as follows:
    <?xml version="1.0" encoding="utf-8" standalone="no"?>
    <RevitAddIns>
    <AddIn Type="Command">
    <Assembly>C:\RevitDevTV\bin\Debug\RevitDevTV.dll </Assembly>
    <AddInId>046d3bb7-7881-4f6b-9681-e5a642ba1243</AddInId>
    <FullClassName>RevitDevTV.Class1</FullClassName>
    <AvailabilityClassName>RevitDevTV.Availability</AvailabilityClassName>
    <Text>HelloWorld</Text>
    <VendorId>ADSK</VendorId>
    <VendorDescription>Autodesk, www.autodesk.com</VendorDescription>
    <VisibiltyMode>AlwaysVisible</VisibiltyMode>
    </AddIn>
    </RevitAddIns>

    I am sure this is some sort of simple noob concept that I just don't understand yet.

    I appreciate any help.

    #2
    Most commands, including keyboard shortcuts, are not active in any schedule view. My advice, change the default start view to a drafting view and try that.

    Comment


      #3
      Originally posted by need4mospd View Post
      Most commands, including keyboard shortcuts, are not active in any schedule view. My advice, change the default start view to a drafting view and try that.
      Thank you. I thought this might be the case, but I had to let my client know.

      Comment


        #4
        Yup, this one isn't available in schedule view. You'll find when you default open to another view it works. And when manually switching to schedule view it will always be greyed out...
        Martijn de Riet
        Professional Revit Consultant | Revit API Developer
        MdR Advies
        Planta1 Revit Online Consulting

        Comment


          #5
          It's not only the Availability class that defines availability of commands. Revit itself decides to activate/inactivcate parts of external and internal commands as well. You overestimate the addin file if you think, that could influence the behavior of commands
          There is another Thing i wouldn't do: Having VendorId and VendorDescrioption looking like it would come from autodesk. This information is displayed if the AddIn crashes for some reason. I think it's at least honest but also a good idea to fill in real values.
          [email protected]

          http://4revit.com

          Comment

          Related Topics

          Collapse

          Working...
          X