GET AN "AsString()" PARAMETER ERROR..?

Good morning.
I am trying to obtain the value of the parameter but it shows an ERROR… I don’t understand why this error appears… could you please help me as I am doing it wrong…??


:face_exhaling:

Hi @AM3D.BIM.STUDIO

Try to check if parameter has value, and then get the value as string. You can check by using the HasValue property:

for i in Elementos:
	if i.LookupParameter("COBIE.Component.InstallationDate").HasValue:
		#then continue your code here

Hope that helps!

I followed your recommendation but now I have another error… similar to the previous one… what is it due to?

Could you share sample rvt file?

ok . here.!
Script_evaluate.dyn (6.3 KB)
GetCobieInstallationDate.rvt (3.7 MB)

Works for me…

And here is workaround for OPTION_2:

In my case it does not work… any other solution as to why it is not working in my case??? :face_exhaling:
For some reason it doesn’t give me an error… it only gives me a null… it will have something to do with the version of pytho or dynamo or revit… I am using the 2021 version of revit

Thank you very much for your help… the mistake was mine, sorry… the stress didn’t let me see the mistake… thank you very much.