View Issue Details

IDProjectCategoryView StatusLast Update
0001830FreeCADBugpublic2014-11-17 20:41
Reportersourcerer Assigned Towmayer  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
PlatformWindows 7OSWindows 7 OS Version7
Product Version0.14 
Summary0001830: Gui.export() cannot handle long filenames
DescriptionOpening a .stp filename with 86 characters works with ImportGui.open() , but when I replace the .stp with .wrl and try to export it with Gui,export() then the exporting does not work, and I do not get the resulting file.
Steps To Reproduceimport FreeCAD
import ImportGui
import FreeCADGui
import os,glob
from PySide import QtGui

for filename in glob.glob("C:/projects/Elektronik/KiCadprojects/Novena/novena_pvt2_a/Root Entry/Models/*.dat.step"):
    ImportGui.open(filename)
    App.setActiveDocument("Unnamed")
    #Gui.SendMsgToActiveView("ViewFit")
    wrl = "C:/projects/"+filename[76:-5]+".wrl"
    #wrl = "C:/Projects/test 2.wrl"
    #QtGui.QMessageBox.information(None,"Apollo program",str(len(wrl)))
    Gui.export(App.ActiveDocument.findObjects("Part::Feature"),wrl)
    QtGui.QMessageBox.information(None,"Apollo program","Written: "+wrl)
    App.closeDocument(App.ActiveDocument.Name)
    App.setActiveDocument("")
    App.ActiveDocument=None
    Gui.ActiveDocument=None
TagsNo tags attached.
FreeCAD Information

Activities

sourcerer

2014-11-17 10:33

reporter   ~0005327

I am sorry, the problem was not the long filenames, but the double-extension ".dat.wrl"
I have changed the script to output ".wrl" instead of ".dat.wrl" filenames, and now it works correctly.
This is not a bug, but an acceptable limitation for me, therefore you can close this bug.

sourcerer

2014-11-17 10:37

reporter   ~0005328

But an error message like "There is no Export File format for .dat.wrl available" would be helpful I think

Related Changesets

FreeCAD: master 3904d0a8

2014-11-17 21:11:28

wmayer

Details Diff
+ fixes 0001830: Gui.export() cannot handle long filenames Affected Issues
0001830
mod - src/Gui/ApplicationPy.cpp Diff File

Issue History

Date Modified Username Field Change
2014-11-16 16:23 sourcerer New Issue
2014-11-17 10:33 sourcerer Note Added: 0005327
2014-11-17 10:37 sourcerer Note Added: 0005328
2014-11-17 20:41 wmayer Changeset attached => FreeCAD Master master 3904d0a8
2014-11-17 20:41 wmayer Assigned To => wmayer
2014-11-17 20:41 wmayer Status new => closed
2014-11-17 20:41 wmayer Resolution open => fixed