When you get a public link, you share it
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi there.
Using the dataFile.publicLink property, a data file that has not been shared will switch to a shared state.
# Fusion360API Python script
import traceback
import adsk.fusion
import adsk.core
def run(context):
ui = adsk.core.UserInterface.cast(None)
try:
app: adsk.core.Application = adsk.core.Application.get()
ui = app.userInterface
datas = app.data.activeFolder.dataFiles.asArray()
data: adsk.core.DataFile = datas[0]
app.log(f'ver {app.version}')
app.log(f'{data.name}.{data.fileExtension}')
app.log(data.publicLink)
except:
if ui:
ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
This feels like an undesirable state.