Results 1 to 3 of 3

Thread: Unable to close active document from revit 2012 api C#

  1. #1
    Woo! Hoo! my 1st post
    Join Date
    2013-08
    Posts
    1
    Login to Give a bone
    0

    Default Unable to close active document from revit 2012 api C#

    I would like to ask a little help regarding my issue.

    I have a push button in a revit plug in. When i click on it i would like to invoke two different commands(custom commands). Is that possible?

    I use Revit 2012 ARchitecture API and my platform is C# .net

  2. #2
    Programming Moderator BlackBox's Avatar
    Join Date
    2009-11
    Posts
    5,500
    Login to Give a bone
    0

    Default Re: Unable to close active document from revit 2012 api C#

    Welcome to AUGI, and congrats on your first post!



    Please post the code you've written, to make it easier for others to help you.

    Cheers
    "How we think determines what we do, and what we do determines what we get."

    Sincpac C3D ~ Autodesk Exchange Apps

    Computer Specs:
    Dell Precision 3620, Core i7-7700K 4.2GHz, 64GB RAM, Samsung 970 Pro M.2, 8GB NVIDIA Quadro P4000

  3. #3
    Member
    Join Date
    2012-09
    Posts
    34
    Login to Give a bone
    0

    Default Re: Unable to close active document from revit 2012 api C#

    Closing the active document isn't supported, but there are workarounds that would allow you to do so. See here for more information: http://thebuildingcoder.typepad.com/...-document.html, http://thebuildingcoder.typepad.com/...hy-not-to.html

    When you say invoke commands, you do mean calling a native Revit function, or a function that you've written yourself?

    If you want to call a native Revit function, then that is not supported in 2012.
    In 2013, you can override a native Revit command with your own command.
    In 2014, you can call a native Revit command to run after the completion of your own command, in addition to being able to override a native command.

    If you want to call your own commands, then you simply need to implement an IExternalCommand that runs all of the functions that you want.

Similar Threads

  1. 2015: unable to save document
    By richard.pinka694795 in forum Revit Architecture - General
    Replies: 1
    Last Post: 2015-08-24, 05:33 AM
  2. Unable to import Point Cloud (.fls) file in Revit 2012
    By jarod.tulanowski in forum Revit Architecture - General
    Replies: 4
    Last Post: 2011-12-07, 12:29 PM
  3. Draw Curve on Active Document using CurveArray
    By shifali.a in forum Revit - API
    Replies: 0
    Last Post: 2010-01-06, 10:22 AM
  4. Does "vla-zoomextents" work only on Active-Document
    By rajat_bapi_mallick in forum AutoLISP
    Replies: 1
    Last Post: 2007-05-25, 06:09 PM
  5. Replies: 6
    Last Post: 2007-04-18, 03:44 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •