Electrical Circuit Tagging

Hi
Im having this issue that im struggling to solve.
I have a project that I need to circuit lighting fixtures in Revit and without indicating wiring on the plans.
We have decided to to give each circuit a reference that indicates which Circuit number and panel number that circuit is So the tag will look like this.

and the schedule will supply additional information

Revit setup
We’ve created a project parameter that is assigned to all circuits and has given them all an unique number
see below, this works

So now each circuit has a unique ID

I then created a shared parameter for all the Light fixtures called CIRCUITID now i want to write those ID’s to the light fixture parameter base on which circuit number and panel that light fixture is connected to.

This is the part that im stuck i dont know where im going wrong this is how far i came


Please help

Hi @Earl-Tyson.Wildschut

Could you share rvt file?

Hi Ehm due to NDA agreements I cant share the actual model but I have a test project, but as a new user im not allowed to upload files

@Earl-Tyson.Wildschut use file sharing service like google drive, Dropbox, or similar.

@Kulkul I would need a email address in order to share via dropbox

use wetransfer and send it to yourself, you will receive a mail with a link in it, post the link here.

Marcel

Hi, Thanks for the response.
I really need some help as im banging my head here
https://drive.google.com/drive/folders/1hZ4xEE9lA21kBLfsAeWn20L-uzd4WyY8?usp=sharing

Hi, So changing it to a math equation maybe will make it easier to understand.
So what im trying to achieve is:
In revit I have multiple electrical circuits let say 1000
And each Electrical Circuit has 3 parameters
(example)
Circuit 1 out of 100
Parameter 1 = 100
Parameter 2 = AA
Parameter 3 = 1

Ok so now im trying to fill in a parameter of a revit family based on their parameters.
So this electrical component has the same parameters 1 and 2 and if that parameters match I need it to set another
if electrical component has the same parameter 1 and Parameter 2 values I need it to set Parameter 3 Value to the Parameter 4 value of the family
(example)
Parameter 1 = 100
Parameter 2 = AA
Parameter 4 = 1 (set parameter value 3 of the circuit above and set it to the family if parameter 1 and 2 matches)

Thanks

I was able to create a Python Script to do this, but i need someone with a bit more Python knowledge to have a look.

image

there seems to be some issue with the nested (j) loop that i cant seem to figure out.

So it seems that the issues was just a data type mismatch. solved by using .AsString().

Since .set() is looking for a string a Revit Parameters are Parameters. I solved it like this :

image