Revit Architecture Forum
Welcome to Autodesk’s Revit Architecture Forums. Share your knowledge, ask questions, and explore popular Revit Architecture topics.
abbrechen
Suchergebnisse werden angezeigt für 
Anzeigen  nur  | Stattdessen suchen nach 
Meintest du: 

How to batch change all image parameter to text parameter?

2 ANTWORTEN 2
GELÖST
Antworten
Nachricht 1 von 3
danezeq
394 Aufrufe, 2 Antworten

How to batch change all image parameter to text parameter?

Hey everyone.

 

i have a project which all the speciel equipment in it has an image parameter which defined as "P.jpg / V.jpg / PV.jpg

I want to batch change all those filenames on image parameter (“סימון קהל יעד”) into a text parameter (“סימון אות קהל יעד”) without the “.jpg” extention) for instance - image parameter says: “P.jpg” > the text parameter will just say “P”

 

this post is somewhat "cross-posted" into another dynamo forum.but i got the message that it faild to solved. here is the link:

https://forum.dynamobim.com/t/replace-all-image-parameters-into-text-parameters/51403

project: http://telavivinf.com/temp/project%20help.rvt

 

Q1.jpgQ2.jpg

 

2 ANTWORTEN 2
Nachricht 2 von 3
L.Maas
als Antwort auf: danezeq

I took a different approach. He used some Python code. I did things with the core nodes

-Get all the special equipment in the project (family instances)

-Get the families and then all the family types.

-Get the image from the family types. 

-If no image present then drop the type.

-Get the name of the image.

-Removee the extension from the image name

-Write the value in the parameter

 

Capture.png

In the end some warnings. Because some of the specialty equipment does not have the parameter to wrote to.

You could modify the script to check if parameter is present and then filter them out if not.

 

Capture2.png

As you can see value is written. Some fields are empty because that family has not the required parameter (you would need to add this parameter to the family if needed) or it has no image.

I did not verify if everything correct, so you should do your checks and modifications where needed

Louis

EESignature

Please mention Revit version, especially when uploading Revit files.

Nachricht 3 von 3
danezeq
als Antwort auf: L.Maas

Okay it work like a charm! thank you! :leicht_lächelndes_Gesicht:

Sie finden nicht, was Sie suchen? Fragen Sie die Community oder teilen Sie Ihr Wissen mit anderen.

In Foren veröffentlichen  

Autodesk Design & Make Report