Hi how can i access the VA API from the new script editor in Rhino 8. I am getting this error.
Nope I have not found a solution. Currently using Rhino Python Editor which I believe runs IronPython. Still unable to access the VA API using the new script editor in R8
OK.
This may be a problem with the new Rhino 8 Script Editor. I will ask McNeel if we need to do something to enable VisualARQ on the new editor.
Enric
Hi @enric , any updates on this? I can import VisualARQ.Script if I open a ironpython file on the Script Editor but it tells me there is no module when I try it on a python 3 file.
Hi @enric and @fsalla , is there any updates on this? Are there major changes that need to be done to the VA API to run it with python 3?
Hi @Julius3,
Yes, I managed to make it work. It’s just some changes in how the modules are referenced and imported in a Python 3 script.
Here is a small sample:
#! python3
import rhinoscriptsyntax as rs
import scriptcontext as sc
import Rhino as rc
from Rhino import Geometry as geo
# Import VisualARQ API
import clr
clr.AddReference('VisualARQ.Script')
from VisualARQ import Script as va
doc = sc.doc
unit_scale = rc.RhinoMath.UnitScale(rc.UnitSystem.Meters, doc.ModelUnitSystem);
wall_style_id = va.GetCurrentWallStyle()
wall = va.AddWall(wall_style_id , geo.Point3d.Origin, geo.Point3d(10,0,0))
print(wall)
Enric
Hi @enric, thanks for this! I will test this out.