The workflow I am considering is the following:Ģ) Inside of spreadsheet WB optimization variables are placed into a special spreadheet (named "Variables"). Good idea to use a Macro to solve this problem. Here is a macro that might be of some use. But if it can export to csv then perhaps you can import that csv as the base spreadsheet instead of creating one in FreeCAD and exporting it. The other application must be able to conform in its output to the desired format. It still requires a few clicks to get your data imported. t(cell,str(getattr(fromSheet,cell)))į("Done merging "+fromSheet.Label+" into "+toSheet.Label+"\n")į("Cells changed = "+str(cellsChanged)+"\n") If getattr(toSheet,cell) != getattr(fromSheet,cell):į("Merging "+fromSheet.Label+"."+cell+" to "+toSheet.Label+"."+cell+" -> "+str(getattr(fromSheet,cell))+"\n") Sel = ()į("Select 2 spreadsheets to merge\n")īlackList = įromSheetCells = ĭoc.openTransaction("Merge Spreadsheets") It would be anyway more complex than simply writing onto the excel file as done with Catia and ZW3D.Ĭode: Select all """merge second selected spreadsheet into first selected sheet""" My optimization procedure is written in python so it should not be too difficult to import a FC module and to interact directly with the FC document. But if both files are open the Std Refresh icon will update correctly for the 'model' file after changes to the 'spreadsheet' file.įrom that It seems that it should be possible to link the spreadsheet variables to an external file (not text but xlsx).Īnyway also your suggestion of doing it from python code is not bad. In the scenario where you first open the 'spreadsheet' file, change one or more values and then open the 'model' file, there won't be any indication that the model needs to be recomputed. The disadvantage is that the model won't automatically recompute after changes to the spreadsheet. The advantage of having the spreadsheet in another file over switching off recomputes is that the spreadsheet itself does get recomputed. You can reference spreadsheet data from an external file with this syntax: =NameOfFile#>.MyAlias. 3) Put the spreadsheet in a separate file:
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |