Results 1 to 4 of 4

Thread: Pass Elemnt from Document to another Revit Api c#

  1. #1
    Login to Give a bone
    0

    Default Pass Elemnt from Document to another Revit Api c#

    Hey,I'm trying to make copy from family Document contain Extrusion (the Element i want to select ) and make copy of it in another Document "I mean there is two opened Documents where i select the element from the family file and paste it in another project file ".
    My Code Sequence:
    1.Make User selects the Element.
    2.get Element ID and get its location
    3.Make the user select the palce where he wants to make a copy of the element "it may be another Document" so before this ,I get the Active Document .
    4.copy command by elemnt id and new position enetered by user.
    The Problem is :
    the active document command raises an exception with selection command and Now i don't know how to solve this issue?
    , also is it will be
    IExternalApplication or IExternalCommand?
    and why when i load family in my document ,the family not appears?
    Please Help me .
    Thanks In Advance

  2. #2
    Active Member
    Join Date
    2011-11
    Location
    Saint-Omer, Pas-de-Calais, France
    Posts
    58
    Login to Give a bone
    0

    Default Re: Pass Elemnt from Document to another Revit Api c#

    Which version of Revit? What is exacty the exception? Please provide us more details and don't ask several questions on a single thread.

  3. #3
    Login to Give a bone
    0

    Default Re: Pass Elemnt from Document to another Revit Api c#

    first i'm sorry for asking several questions in the same thread but i'm new to Revit Programming so i need some guidness. I use Revit Arch 2012.
    The Exception from pickObj because using of " _doc = commandData.Application.ActiveUIDocument.Document;" when press in another revit document.
    Can you Help me please?

  4. #4
    Active Member
    Join Date
    2011-11
    Location
    Saint-Omer, Pas-de-Calais, France
    Posts
    58
    Login to Give a bone
    0

    Default Re: Pass Elemnt from Document to another Revit Api c#

    I don't believe that you can do this on 2012. The API for transferring elements from one document to an other has been introduced in 2014: http://thebuildingcoder.typepad.com/...assertion.html. What you can do is perhaps creating a new element and copy the values of the source parameters. See also: http://adndevblog.typepad.com/aec/20...s-via-api.html

Similar Threads

  1. Windows Form Pass to Revit Command
    By annl in forum Revit - API
    Replies: 5
    Last Post: 2009-09-30, 04:25 PM
  2. Revit Standards Document
    By krista.manna in forum Revit Architecture - General
    Replies: 11
    Last Post: 2009-04-22, 04:01 PM
  3. Revit MEP Shortcut Document?
    By Misteracad in forum Revit MEP - General
    Replies: 10
    Last Post: 2008-11-05, 03:44 PM
  4. Add an elemnt with VBA?
    By sgroff in forum Project Navigator
    Replies: 3
    Last Post: 2008-06-06, 08:56 PM
  5. Activating Revit - help document
    By Wes Macaulay in forum Revit Architecture - General
    Replies: 13
    Last Post: 2004-12-15, 11:45 AM

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
  •