How to create a new "project" parameter? Not SHARED parameter

onureFFSPL
Participant
Participant

How to create a new "project" parameter? Not SHARED parameter

onureFFSPL
Participant
Participant

Hello.

 

Please check this project parameter I created manually for "View" elements. Now I need to create it via Revit Api and C#.

 

I am somewhat experienced programming for Revit Api but all solutions I can find on Internet are for creating a shared parameter. I need to create a project parameter just like in this screenshot.

 

Can you please help?

 

onureFFSPL_0-1712960468716.png

 

0 Likes
Reply
236 Views
3 Replies
Replies (3)

ricaun
Advisor
Advisor

Create project parameter is not available in the Revit API, only Shared parameter. 😅

Luiz Henrique Cassettari

ricaun.com - Revit API Developer

AppLoader EasyConduit WireInConduit ConduitMaterial CircuitName ElectricalUtils

0 Likes

Moustafa_K
Collaborator
Collaborator

Not sure this is the best way to do it, but you may try as follow [not tested]:

1. store or save the current shared parameter file if any.

2. creating a temporary shared parameter file,

3. create the shared parameter you are looking to have,

4. then remover this temp shared parameter file

UiApp.Application.SharedParametersFilename = null

5. or restore back the original shared parameter file 

Moustafa Khalil
Cropped-Sharp-Bim-500x125-Autodesk-1
0 Likes

onureFFSPL
Participant
Participant

I ended up creating a Global text parameter and storing the data in it by converting the data into Json string. The data contains the View3D elements' UniqueId. This way I am able to store all the data specific to each View3D element; not on the element itself as a regular parameter but in the single global parameter in Json format.

 

I hope this helps other people who read this in the future.

0 Likes