Generated code from scala.js works, FYI

Generated code from scala.js works, FYI

Anonymous
Not applicable
631 Views
1 Reply
Message 1 of 2

Generated code from scala.js works, FYI

Anonymous
Not applicable

If you're interested in the new API stuff but prefer to work in Scala, I just tried running code generated from scala.js in a Fusion360 script, and the basics seem to be working fine.  Fusion360-api plus Scala.js is pretty much the definition of bleeding-edge, but I think it's got serious potential.  (Assuming that you're not going to have a JVM native scripting environment, of course - I've been assuming that since you're talking about JavaScript and Python a jvm thing isn't in the cards...)

 

It'd be really nice to have the types available in some kind of machine-readable format (other than the html for the doc site).  C/C++ header files, whatever you've got - it'd be better than building traits by parsing html.

 

0 Likes
632 Views
1 Reply
Reply (1)
Message 2 of 2

KrisKaplan
Autodesk
Autodesk

James,

 

Great to hear.

 

FWIW: As for parsing, you may want to look at the Tern definition files we include in the application's 'defs' folder (core.json, fusion.json, and utilities.json).  These files are JSON (of course) in the format that the Brackets editor needs to supply to the Tern engine to generate the code hints.  These should make it trivial to extract type information about the API (unfortunately, this does not currently include the documentation strings).

 

Kris



Kris Kaplan
0 Likes