Transfer project Parameter

Transfer project Parameter

Anonymous
Not applicable
2,676 Views
1 Reply
Message 1 of 2

Transfer project Parameter

Anonymous
Not applicable

Hi,

 

Hi have a rvt file with a Project parameter named "TOTBarre" and associated to rebar

can i transfer it to another file using API?

I use this code for transfer rebartype, but for parameter?

  Dim list2 As New List(Of RebarBarType)(Enumerable.Cast(Of RebarBarType)(New FilteredElementCollector(docTemplate).OfClass(GetType(RebarBarType))))
                Dim listID2 As IList(Of ElementId) = New List(Of ElementId)
                If (list2.Count = 0) Then
                    MsgBox("Le annotazioni per armature sono state cancellate dal file prototipo!",, "ED-RebDet2D - Caricamento Standad di Progetto")
                    t.RollBack()
                    GoTo a300
                End If

                Dim type1 As RebarBarType
                For Each type1 In list2
                    listID2.Add(type1.Id)
                Next
                ElementTransformUtils.CopyElements(docTemplate, listID2, _doc, Nothing, New CopyPasteOptions)

Thanks

Stefano

0 Likes
Accepted solutions (1)
2,677 Views
1 Reply
Reply (1)
Message 2 of 2

matthew_taylor
Advisor
Advisor
Accepted solution

Hi @Anonymous,
The way to test this is to do the process manually.

  1. Find out the elementId of thing you want to copy
  2. Select it using Manage > Inquiry > Select by ID
  3. 'Copy to Clipboard'
  4. Go to new project
  5. 'Paste from Clipboard'

Check if warnings/errors happen, then check results.

 

In my experience, this process is a facsimile.


Cheers,

-Matt
_______________________________________________________________________________
Marking a post as a 'solution' helps the community. Giving a post 'Kudos' is as good as saying thanks. Why not do both?
0 Likes