Community
Fusion API and Scripts
Got a new add-in to share? Need something specialized to be scripted? Ask questions or share what you’ve discovered with the community.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Can somebody help me? it does not work

3 REPLIES 3
Reply
Message 1 of 4
rvr
Participant
220 Views, 3 Replies

Can somebody help me? it does not work

Captura de pantalla 2018-01-20 a las 23.56.59.png

3 REPLIES 3
Message 2 of 4
marshaltu
in reply to: rvr

Hello,

 

From the message you posted, it was because a string cannot be converted to float. However it is difficult to judge what's the root cause. It would be better if you can provide reproducible steps and test data. You can send the information to me(marshal dot tu at autodesk dot com) if it is not convenient to post them here. 

 

Thanks,

Marshal



Marshal Tu
Fusion 360 Developer
Autodesk, Inc.

Message 3 of 4
rvr
Participant
in reply to: marshaltu

Hello ........ thanks for your time, see screenshots of roadmap screens of the set:
1.- download .dat from the web page http://airfoildb.com/, copy and paste in textedit from mac, I convert .txt into .dat.

 

Captura de pantalla 2018-01-22 a las 11.14.42.pngCaptura de pantalla 2018-01-22 a las 11.09.21.pngCaptura de pantalla 2018-01-22 a las 11.09.38.pngCaptura de pantalla 2018-01-22 a las 11.09.55.pngCaptura de pantalla 2018-01-22 a las 11.10.06.png

2.- with the script Airfoil_DAT_to_spline I perform the actions

3.- error

Message 4 of 4
marshaltu
in reply to: rvr

Hello,

 

There was a bug in the addin. The statement "line[0:p1]" marked as red extracted a bad string (e.g. "1.000000,"). It should be corrected with "line[0:p1-1]".

 

Thanks,

Marshal

 

 

        while line:
            line = line.strip(' \t')
            line = line.replace('\t', '')
            p1 = line.find(" ")
            p2 = line.rfind(" ")
            x = float(line[0:p1]) * Chord + OffsetX
            y = float(line[p2+1:]) * Chord * ScaleY + OffsetY
            point = adsk.core.Point3D.create(x, y, 0.0)
            points.add(point)
            # Reading next line with coordinates
            line = f.readline()
        f.close() 

 



Marshal Tu
Fusion 360 Developer
Autodesk, Inc.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Technology Administrators


Autodesk Design & Make Report