Convert multiple text files from Unicode to ANSI

In my picture above a list of files is converted.
I suggest you to make a custom node and set lacing on “longest”.

Hi @robert12546358,
Attached is the sample text file in Unicode encoding.
Thanks & regards,
ChinWindow Quantities_.txt (396 Bytes)

Hi @Alban_de_Chasteigner,

Thanks for the help! Referring to your dynamo & python script with little adjustment, I managed to combine the tasks of exporting schedules and convert text file encoding in a single dynamo script. However, I need to click “Run” for twice to achieve the 2nd objective, which is to convert all the text files from Unicode to ANSI format. Is there anyway to change it to one-time click?
I have attached my dynamo script and a sample Revit file here.

Hi @viktor_kuzev,
Thanks for the sharing on what is ANSI and the simple coding to convert text file encoding!

Hi @Jonathan.Olesen & @oliveira.luma,
I have attached my dynamo script and a sample Revit file here. Hope these help!

Thank you.
Captureexp_sched_encode.dyn (13.0 KB)

Regards,
Chinsample.rvt (1.5 MB)

Hi @ddd-team,

To run the graph with a “one-time click”, before encoding the schedules in ANSI, you need to wait for the finalization of the schedules export.
You can use the node “Passthrough” from Clockwork.

Hi @Alban_de_Chasteigner,

Thank you very much for the solution!
Now my dynamo script works with “one-time” click. :smile:

Regards,
Chin

You’re welcome.
Can you mark a post as solution for other users ?

An alternative solution to the “passthrough” node is to simply use a codeblock with the content:
{waitfor,pass}[1]
This is if one do not wish to be dependent on a user having specific packages loaded.

Yes, sure. I have marked your previous post as solution. Is it ok?

Hi @Jonathan.Olesen,

Yes, this is what i did too. I extracted the code block from the custom node.
Thanks!

Regards,
Chin

Sure, thanks.
It’s useful to have marked solutions to keep the forum well organised.

1 Like