Putting pieces of code in this forum

Hi,

How can I put my python scripts in this forum in the way I see many people put it like the image bellow? In a way someone can copy it to the clipboard.
image

Regards,

1 Like

Hi,

Just use the Preformatted text button.
Paste your script, select it and use the Preformatted text button.

Here is a gif in action showing how you can post as preformatted text :
https://forum.dynamobim.com/t/pipe-to-topo/5674/4

4 Likes

Thank you !

1 Like

You can highlight a section of code in the text box and click the </> button in the toolbar. This post has a .gif on it: How to get help on the Dynamo forums. You can wrap single line codes with ` ` (tilde key) as well. And @Alban_de_Chasteigner beat me to it.

Important to note that the code will not always be copied and pasted properly. Sometimes double quotation marks (" ") will be changed to &quote or whatever the base code for it is and indentations will be removed. Always double check pasted code to make sure it looks correct.

4 Likes

:ok_hand::ok_hand:

1 Like

As Kenny said, I avoid using " as these go a bit mad… I use ’ :smiley:

2 Likes