Helo Forum,
I have a simple question: Would it be possible to make a (project or shared) parameter non-editable after filling in some values like (text, integer, etc)
Any response would be appreciated.
Thank you in advance
Regards,
Rasa
Helo Forum,
I have a simple question: Would it be possible to make a (project or shared) parameter non-editable after filling in some values like (text, integer, etc)
Any response would be appreciated.
Thank you in advance
Regards,
Rasa
@shahrasa , hi
you can lock them via formulars in .rvt or .rfa files⦠with Dynamo i have no knowingā¦
Hi Draxl,
Thank you for you reply. This can still be editable. I was wondering if it would be possible through the Revit API to lock a parameter and (maybe) show it as āread onlyā, while it was originally editableā¦
i had already a similar issue⦠but nobody had an idea @shahrasa
creating Parameters takes filespace⦠when you lock unique values, it can result in performance leak.
thatās weird, wouldnāt you agree? and you did not get any answer to you question: āIs there a way to lock a parameterā. I am not trying to lock unique values⦠the goal can be:
a other way that w role out: using keyschedules so Parameters get filled by elected valuesā¦
But it can`t locked⦠you can be a owner of a worksetā¦
Hi Guys, @jacob.small @Nick_Boyts @GavinCrump @solamour
Sorry for involving you. I learned a lot from you, so I think that you guys can answer my questionā¦
@Draxl_Andreas thanks mate, but I am certain it is possible through Revit APIā¦
Hi @shahrasa ,
Is there a way this could even be done through Revit? So without using Dynamo?
This isnāt really a Dynamo question.
Hi @Daan,
No, I guess this is not a Dynamo question. But it can be a Revit API question? and the only way I can access Revit API is through Dynamo. If it is not possible, then it is not possible⦠Anyway tnx for the response
I think you would get a better answer when asking the same question on a Revit forum.
Also you can access the Revit API in a lot of different ways, Dynamo is just one of them.
Doable via Dynamo accessing the RevitAPI (which is what Dynamo does anytime it interacts with Revit).
That said, I am not a fan of the workflow as it usually (literally like 99% of the time) leads to more headaches then it ever solves for both downstream BIM uses and in-house coordination purposes (I canāt edit this thing and itās wrong!).
What is the specific use case you have in mind?
EDIT: Just saw the use cases aboveā¦
If youāre still interested, Iāll see about putting a tutorial together, but youāll have to watch it and write the code from that. Itāll be a learning exercise for you that will allow you to progress, and Iāll get the piece of mind that youāll be competent enough to āfix itā in the future when it is inevitably required.
Hi Jacob,
Thanks for you plain explanation. I am still very interested. I always want to learn and this is a great learning opportunity. I can a little bit of Python and through tutorials and research that knowledge is getting bigger
PS. I can run the add-in after detaching the model and share it⦠that way the information wonāt be casted in stone⦠right?
With kind regard,
Rasa
+1 to Jacobās post.
Train/trust your users.
If you must lock it in, use something like the property wizard add-in, donāt delve into dark art code that will no doubt cause problems if the evil wizard who implemented it turns out not to be so bus proof.
If you donāt want other people modifying your model then just send them for information only, itās a legal thing ultimately versus āI want to protect our firms cool stuffā. The idea of read-onlyāing Revit files is a dead end in my experience - donāt bother protecting them any more than purging what you donāt need to transfer.
The best way to lock your data in is to prefix your parameters that are crucial. For example make the name of your copyright parameter the actual copyright notice. If people remove it, oh well. They probably wont have the system to integrate it into anyway.
And now I think Iāll need a different hat than usual for this recordingā¦
No. This has to be set when the parameter is created; there is no ālock it after the factā. This will also mean that the methods you use for element creation will be limited in that context as well. Once the value is provided, there is no going back without using an API method to adjust it. Users are literally handcuffed for values. Copying, duplicating, create similar and grouping elements can all become a bit problematic as a result.
Time wise⦠this is going to have to wait a bit. I have some stuff to present at BiLT NA which will have to be wrapped up first (so much stuff being built for that itās scary). If you havenāt seen something from me by the 22nd of next month, please reach out. In the meantime, brush up on your Python skills, then the Revit API. Pay close attention to Revit parameters class and extensible storage class, as those are the two things Iāll likely be touching on.
@GavinCrump Thank you for the advise. I also see a lot of handy use cases as to help the users. I think, it is important for me to understand what the possibilities are and in which way I can implement these possibilities in our workflow. Therefor, I am very interested in understanding this topic.
@jacob.small Thank you as wel and I will send a reminder.
Hello all,
This topic is a bit diluted for me due to busyness. Lately, I searched a lot on the internet, but I couldnāt find anything. Can anyone push me in the right direction? such as āclassesā, āmodulesā, āmethodsā in revit API? Very much appreciated.
With kind regards,
Rasa