save design & "add version description" pop up

save design & "add version description" pop up

Anonymous
Not applicable
2,847 Views
17 Replies
Message 1 of 18

save design & "add version description" pop up

Anonymous
Not applicable

Hi,

I have a code wich opens designs, modifies them, saves them and closes them.

This code turns successfully for months, but since yesterday, when the line  :

 

app.activeDocument.save(' ')

 

comes then the pop up windows "add version description" appears but I don't want it because I have now to click "ok" for each documents and wait each of those pop up...

 

Is there a solution to fix it please?

 

 

0 Likes
2,848 Views
17 Replies
Replies (17)
Message 2 of 18

ahsan.autodesk
Autodesk
Autodesk
Thanks for reporting this. This appears to be a regression. I've logged an internal issue (UP-45932) to track this. Someone will look into it shortly.
Regards
Ahsan Ali
Fusion Senior Software Architect
0 Likes
Message 3 of 18

goyals
Autodesk
Autodesk

I just tried on build 2.0.7824 but not able to reproduce it. I tried following steps

 

1. Open an existing design from side-panel

2. Modify the design.

3. Open text command window and switch to "Py" mode

4. Execute below script 

app = adsk.core.Application.get()

app.activeDocument.save("")

A new version is created without showing "Add Version Description" dialog. Not sure If I am missing any step here. Thanks.



Shyam Goyal
Sr. Software Dev. Manager
0 Likes
Message 4 of 18

Anonymous
Not applicable

I am sorry I check more precisely and I make a mistake. This is not the save function but the saveas function which has my problem.

But I don't understand , this code works :

dossier=projet.rootFolder.dataFolders.itemByName('api')
dossier=dossier.dataFolders.itemByName('pieces_standards')
dossier=dossier.dataFolders.itemByName('inox_nouveau')
dossier=dossier.dataFolders.itemByName('UNICUM_embalage_moteur')
fichier=dossier.dataFiles.item(0)

#OUVERTURE FICHIER LONGI ext
i=0
while fichier.name!='moteur_entier':
      fichier=dossier.dataFiles.item(i)
      i=i+1

# Get active design
product = app.documents.open(fichier,True)
design = adsk.fusion.Design.cast(product)

# Get active design
product = app.activeProduct
design = adsk.fusion.Design.cast(product)
rootComp = design.rootComponent
#if app.activeDocument.isSaved:
app.activeDocument.save('')
app.activeDocument.saveAs('_moteur_entier',dossier2,fichier.name,fichier.name)

app.activeDocument.close(True)

 

 

AND this code makes me the popp up :

 

i=0
while fichier.name!='LS-xxxx':
    fichier=dossier.dataFiles.item(i)
    i=i+1

# Get active design
product = app.documents.open(fichier,True)
design = adsk.fusion.Design.cast(product)

# Get active design
product = app.activeProduct
design = adsk.fusion.Design.cast(product)
rootComp = design.rootComponent

rootComp = design.allParameters

#On modifie la longueur du longreron secondaire
dimension=rootComp.itemByName('d9') #d9 = longueur d'extrusion
dimension.value=long_sec/10

#On sauvegarde ce nouveau longeron dans le bon dossier
#if app.activeDocument.isSaved:
ui.messageBox('0')
app.activeDocument.save('')
ui.messageBox('1')
app.activeDocument.saveAs('LS-'+str(int(long_sec)),dossier2,'LS-xxxx','LS-xxxx') 

#POP UP WINDOW !!!!!!!!
ui.messageBox('2')
app.activeDocument.save('LS-xxxx')
ui.messageBox('3')
app.activeDocument.close(True)

 

So i am quite lost 🙄.

Do i make something wrong?

0 Likes
Message 5 of 18

goyals
Autodesk
Autodesk

I am not able to notice any problem with SaveAs method as well. I hope you must have added following line in second case intentionally which displays a message box . Can you please attach screenshot of the dialog you are noticing? Thanks.

ui.messageBox('1')



Shyam Goyal
Sr. Software Dev. Manager
0 Likes
Message 6 of 18

Anonymous
Not applicable

yes i write

 

ui.messagebox('1')

...

ui.messagebox('2')

...

ui.messagebox('3')

 

 

to know where the problem arrives exactly (a kind of debug).

 so I had the message 1 which appears and just after the add version description pop up and just after the message 2 and 3.

0 Likes
Message 7 of 18

Anonymous
Not applicable

With this code for exemple :

product = app.documents.add(adsk.core.DocumentTypes.FusionDesignDocumentType)
app.activeDocument.saveAs('_secondaires_longueur',dossier2,'_secondaires_longueur','_secondaires_longueur') 
app.activeDocument.saveAs('_secondaires_total',dossier2,'_secondaires_total','_secondaires_total') 
app.activeDocument.saveAs('_primaires_longueur',dossier2,'_primaires_longueur','_primaires_longueur') 
app.activeDocument.saveAs('_primaire_transversal',dossier2,'_primaire_transversal','_primaire_transversal')

app.activeDocument.saveAs(dossier_client,dossier2,dossier_client,dossier_client) 

 

I need to click 5 times "ok" on the dialogbox "add version description":

 

vincent84FJV_0-1587121508044.png

 

0 Likes
Message 8 of 18

goyals
Autodesk
Autodesk

I am able to reproduce this problem now. I appreciate you effort for following up on it. UP-45932 is the ticket number created to track this. Thanks for your patience. 



Shyam Goyal
Sr. Software Dev. Manager
0 Likes
Message 9 of 18

Anonymous
Not applicable

Hi,

Havve you some news about it ?

0 Likes
Message 10 of 18

goyals
Autodesk
Autodesk

We are able to fix it. The fix would be available as part of next major update of Fusion. This update is plan at the end of June. Thanks. 



Shyam Goyal
Sr. Software Dev. Manager
0 Likes
Message 11 of 18

scottmoyse
Mentor
Mentor

API regressions being fixed this slowly isn't good. It certainly doesn't bode well for anyone trying to seriously build add-ins on top of Fusion 360 which are either business critical or being sold to customers.


Scott Moyse
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.


EESignature


RevOps Strategy Manager at Toolpath. New Zealand based.

Co-founder of the Grumpy Sloth full aluminium billet mechanical keyboard project

Message 12 of 18

keqingsong
Community Manager
Community Manager

This is getting fixed in the upcoming update. 


Keqing Song
Autodesk Fusion Community Manager
Portland, Oregon, USA

Become an Autodesk Fusion Insider



0 Likes
Message 13 of 18

goyals
Autodesk
Autodesk

@Anonymous May I know if you get the chance to try the fix came through latest Fusion update. Let us know If you notice any issue. Thanks.



Shyam Goyal
Sr. Software Dev. Manager
0 Likes
Message 14 of 18

Anonymous
Not applicable

@keqingsong Can you let me know when the fix will be released please? Thank you

0 Likes
Message 15 of 18

goyals
Autodesk
Autodesk

The fix is already provided with Fusion June update. Are you still seeing this issue even after update? Thanks.



Shyam Goyal
Sr. Software Dev. Manager
0 Likes
Message 16 of 18

Anonymous
Not applicable

@Anonymous actually it works now when you enter at least one string in the description. I was trying without any strings and the pop up window was still appearing. Thanks for following up.

0 Likes
Message 17 of 18

Anonymous
Not applicable

I will try as soon as possible (I think this week or next week)

I didn't have time last weeks.

0 Likes
Message 18 of 18

Anonymous
Not applicable

Ok i have just tried and it seems to work generally.

 

This code works (without pop up):

app.activeDocument.save('')
app.activeDocument.saveAs("LS-"+str(int(long_sec)),dossier2,"LS-xxxx","LS-xxxx")
app.activeDocument.save('LS-xxxx')
app.activeDocument.close(True)

 

-----------------------------------------

 

But with this code I have the pop up

if app.activeDocument.isSaved:
         app.activeDocument.save('')
app.activeDocument.saveAs('MUR-PISCINE',dossier2,'','')

app.activeDocument.save('MUR-PISCINE')
app.activeDocument.close(True)

 

 

For me it is ok now.

 

Thank you to have fixed it !

0 Likes