Wrong script

I have a pattern based family with ncp parameter and i want to change its value based on the distanse between the panels and another element
can you tell me whats wrong with my script
The warning says that unittype is invalid

What does the warning say?

1 Like

What is the unit type for the ncp4 parameter? Ie: does it expect square meters? A string (aka text)?

Its a (normalized curve parameter)

Can you create one instance of this family in a new file, and post that file and a basic DYN (select model element, and a set parameter value by name with a number slider between 0 and 1 should do the trick) so I can review? Either a bug (unlikely but possible) or an issue elsewhere in the family.

If you can’t recreate on the simple graph it may be that there is a list issue in your graph, or that you’ve got filters acting up, in which case post the full .dyn so we can see where the issue is.

1 Like

I am trying to post the dyn and family files but apparently new users can’t upload attachments

Use a different service, such as Onedrive, Dropbox, Google Drive, Box etc… Be sure the share settings are open to all.

1 Like

Here’s the link
thank you very much

1 Like

In this tutorial he seems to have the exact same problem i had but i can’t do the solution he suggested
He replaced the node with a python script

hello…strange these guys there had made that video dont wanna share the python…

First up… I feel like I’d be doing you and the larger community a disservice in not pointing out that you’re running a Revit build missing SEVEN key product updates, including 3 publicly disclosed vulnerabilities (meaning there is a known security exploit published) and a Dynamo update (to 2.6, which has a LOT of nice new features and fixes). You need to update your stuff to keep your work function, stable, and safe.

That out of the way, the only way which I was able to make this fail, was by using the family inside an in-place mass. This is because the surface family can only be used in the conceptual massing environment, which means that to set the parameters of the elements inside the family you must first start a new transaction to edit the in-place mass, which means Dynamo cannot execute. If you use the surface family in the conceptual massing environment instead it works quite nicely, although you may want to edit the location point somehow (although to be honest I am not sure how that’s done in the surface family, and that may not be an issue if you’re working in units different than mine - decimal feet).

If the conceptual mass isn’t an option, you could look into using the family in the project environment, but that will require some extra work to place the instances.

1 Like

I was actually working in a conceptual massing invironment
Thank you very much for your time and help
And i will fix the revit build problem

1 Like