Save Dxf file Automatically
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Can anybody help???
I have the following script file:
import adsk.core, adsk.fusion, traceback
import os
def run(context):
ui = None
try:
app = adsk.core.Application.get()
ui = app.userInterface
sketches = []
for seln in ui.activeSelections:
sketch = adsk.fusion.Sketch.cast(seln.entity)
if sketch:
sketches.append(sketch)
for sketch in sketches:
fullpath = os.path.join('C:\Pda', sketch.name)
ui.messageBox(fullpath)
sketch.saveAsDXF(fullpath + '.dxf')
except:
if ui:
ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
When I run it, I need to firstly, manually select the sketch.
Is there any way that the above script can be modified so that "Sketch1" is always automatically selected without me having to manually select it first???
Many thanks in advance!!!!!
Darren