Python IDE

#1

Does anyone have experience in changing the integrated Python IDE?

I would like to change for something with a bit more features. Preferable something like VSCode

It is this integrated Python IDE I would like to change…

0 Likes

Python autocomplete?
What is the best language to learn while developing Revit API scripts?
Add .dll reference to get the Intellisense
Aims & Skills
Splitting topics and locking is poorly administered
#2

You can use any of them. You would then have to save the file on your drive, and use Python Script from String to evaluate it in Dynamo. That’s a decent trade-off for being able to get extra functionality.

1 Like

#3

I had an idea that this would be the trade-off, but I think (hope) it is worth it :slight_smile:

So essentially, code it in parallel and then copy/paste the code back into the integrated Python IDE to test if it works. Using ‘Python Script from String’ has some limitations… but methodological is the same :slight_smile:

0 Likes

#4

you don’t have to copy paste. Just use Python Script from String to evaluate the code that was saved on your drive.

1 Like

#5

ahhh you mean sending a py file as string to it… thats a really cool idea :slight_smile:

just for the record if someone wants to test this!
Notice that both " and ’ is accepted, that would not go if it was inside a code block!

import clr
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *

clr.AddReference("DSCoreNodes")
import DSCore
from DSCore import *

#Inputs is stored in the IN variable
lst = IN[0]

result = []
for _, val in enumerate(lst) :
	if val == 1 :
		result.append(Color.ByARGB(255,255,0,0))
	elif val == 2 :
		result.append(Color.ByARGB(255,255,128,64))
	elif val == 3 :
		result.append(Color.ByARGB(255,0,255,0))
	elif val == 4 :
		result.append(Color.ByARGB(255,0,255,255))
	else :
		result.append(None)

#Assign output to the OUT variable.
OUT = result

.

The code done inside dynamo as script in a code block!

0 Likes

#6

…and testing inside the ‘Visual Studio Code’ IDE, trying to add a 5th elif

It works absolutely amazing, thanks @Konrad_K_Sobon :slight_smile:

For the record, I didn’t do anything else than install Visual Studio Code.
I changed the theme to “Quiet Light for VSC” and adjusted the font to be “bold”.

7 Likes

#7

Very nice, @erfajo and @Konrad_K_Sobon . Thx a lot for sharing :blush:

0 Likes

split this topic #8

A post was split to a new topic: Add .dll reference to get the Intellisense

0 Likes

split this topic #9

21 posts were merged into an existing topic: Add .dll reference to get the Intellisense

0 Likes

split this topic #15

3 posts were merged into an existing topic: Add .dll reference to get the Intellisense

0 Likes

closed #16
0 Likes