<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Export SketchPoint Coordinates in csv file in Fusion API and Scripts Forum</title>
    <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/export-sketchpoint-coordinates-in-csv-file/m-p/9018519#M13648</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to export coordinates of a point (more points in the future) to a csv-file.&lt;/P&gt;&lt;P&gt;I am not an experienced coder, but even with help of google and some friends I couldn't figure it out.&lt;/P&gt;&lt;P&gt;I tried the in python included csv module, csv.DictWriter etc. but i always get the same error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;OSError: [Errno 30] Read-only file system: 'coordinates.csv'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried moving the directory of the .py file to different paths, where I know i have write rights but still the error persists.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt; #Author- 
#Description- 

import adsk.core, adsk.fusion, adsk.cam, traceback, csv 
app = adsk.core.Application.get() 
ui = app.userInterface 
pntEntity = ui.selectEntity('Select a sketch point', 'SketchPoints') 

pnt = adsk.fusion.SketchPoint.cast(pntEntity.entity) 
fields=['X-Coord','Y-Coord','Z-Coord'] 
with open(r'coordinates.csv', 'a') as coord_csv: 
writer = csv.writer(coord_csv) 
writer.writerow(fields)
writer.writerow('{0}'.format(pnt.geometry.x)) &lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 11 Sep 2019 09:11:05 GMT</pubDate>
    <dc:creator>_fabschke_</dc:creator>
    <dc:date>2019-09-11T09:11:05Z</dc:date>
    <item>
      <title>Export SketchPoint Coordinates in csv file</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/export-sketchpoint-coordinates-in-csv-file/m-p/9018519#M13648</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to export coordinates of a point (more points in the future) to a csv-file.&lt;/P&gt;&lt;P&gt;I am not an experienced coder, but even with help of google and some friends I couldn't figure it out.&lt;/P&gt;&lt;P&gt;I tried the in python included csv module, csv.DictWriter etc. but i always get the same error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;OSError: [Errno 30] Read-only file system: 'coordinates.csv'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried moving the directory of the .py file to different paths, where I know i have write rights but still the error persists.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt; #Author- 
#Description- 

import adsk.core, adsk.fusion, adsk.cam, traceback, csv 
app = adsk.core.Application.get() 
ui = app.userInterface 
pntEntity = ui.selectEntity('Select a sketch point', 'SketchPoints') 

pnt = adsk.fusion.SketchPoint.cast(pntEntity.entity) 
fields=['X-Coord','Y-Coord','Z-Coord'] 
with open(r'coordinates.csv', 'a') as coord_csv: 
writer = csv.writer(coord_csv) 
writer.writerow(fields)
writer.writerow('{0}'.format(pnt.geometry.x)) &lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Sep 2019 09:11:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/export-sketchpoint-coordinates-in-csv-file/m-p/9018519#M13648</guid>
      <dc:creator>_fabschke_</dc:creator>
      <dc:date>2019-09-11T09:11:05Z</dc:date>
    </item>
    <item>
      <title>Re: Export SketchPoint Coordinates in csv file</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/export-sketchpoint-coordinates-in-csv-file/m-p/9018548#M13649</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;pass the full path of the CSV file to the &lt;STRONG&gt;open&lt;/STRONG&gt; function.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The execution path is not the same as the one where your py file is stored.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try this small example:&lt;/P&gt;
&lt;PRE&gt;import adsk.core, adsk.fusion, adsk.cam, traceback

import os

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui  = app.userInterface
        ui.messageBox('{}\n{}'.format(os.getcwd(), os.path.dirname(__file__)))

    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))&lt;/PRE&gt;</description>
      <pubDate>Wed, 11 Sep 2019 09:23:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/export-sketchpoint-coordinates-in-csv-file/m-p/9018548#M13649</guid>
      <dc:creator>JeromeBriot</dc:creator>
      <dc:date>2019-09-11T09:23:23Z</dc:date>
    </item>
    <item>
      <title>Re: Export SketchPoint Coordinates in csv file</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/export-sketchpoint-coordinates-in-csv-file/m-p/9018603#M13650</link>
      <description>&lt;P&gt;Wow, that was easy!&lt;/P&gt;&lt;P&gt;Yes that worked!&lt;/P&gt;&lt;P&gt;Thank you very much&lt;/P&gt;</description>
      <pubDate>Wed, 11 Sep 2019 09:47:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/export-sketchpoint-coordinates-in-csv-file/m-p/9018603#M13650</guid>
      <dc:creator>_fabschke_</dc:creator>
      <dc:date>2019-09-11T09:47:17Z</dc:date>
    </item>
    <item>
      <title>Re: Export SketchPoint Coordinates in csv file</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/export-sketchpoint-coordinates-in-csv-file/m-p/12003654#M13651</link>
      <description>For exporting points coordinates to a csv file, i use python add-in you can download from github,&lt;BR /&gt;you find it searching for username kantoku and go to repository&lt;BR /&gt;Fusion360-ExportSketchPointsCoordinate, or click here: &lt;A href="https://github.com/kantoku-code/Fusion360-ExportSketchPointsCoordinate" target="_blank"&gt;https://github.com/kantoku-code/Fusion360-ExportSketchPointsCoordinate&lt;/A&gt;</description>
      <pubDate>Thu, 01 Jun 2023 09:01:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/export-sketchpoint-coordinates-in-csv-file/m-p/12003654#M13651</guid>
      <dc:creator>karimgrase</dc:creator>
      <dc:date>2023-06-01T09:01:22Z</dc:date>
    </item>
    <item>
      <title>Re: Export SketchPoint Coordinates in csv file</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/export-sketchpoint-coordinates-in-csv-file/m-p/12324161#M13652</link>
      <description>&lt;P&gt;I just checked the code you uploaded and it is not correct. Somehow I don't get the coordinates of the construction points.&lt;/P&gt;</description>
      <pubDate>Mon, 23 Oct 2023 11:53:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/export-sketchpoint-coordinates-in-csv-file/m-p/12324161#M13652</guid>
      <dc:creator>fivallesgarcia</dc:creator>
      <dc:date>2023-10-23T11:53:30Z</dc:date>
    </item>
  </channel>
</rss>

