View Issue Details

IDProjectCategoryView StatusLast Update
0001492File formatsFeaturepublic2019-07-30 22:40
Reporterbarleyman Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
PlatformPCOSWindowsOS Version7 x64
Summary0001492: IDF import does not find footprints
Descriptionidf.py is using wrong directory for libraries
Steps To ReproduceFrom the FILE menu, select OPEN and select an *.emn file
Additional InformationOpening IDF file throws an exception

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Program Files\FreeCAD 0.14\Mod\Idf\Idf.py", line 66, in open
    process_emn(doc,filename)
  File "C:\Program Files\FreeCAD 0.14\Mod\Idf\Idf.py", line 133, in process_emn
    place_steps(doc,placement,board_thickness)
  File "C:\Program Files\FreeCAD 0.14\Mod\Idf\Idf.py", line 334, in place_steps
    model_file=pythonopen(model_tab_filename, "r")
<type 'exceptions.IOError'>: (2, 'No such file or directory', 'C:/Program Files/FreeCAD 0.14/data/Mod/Idf/lib/footprints_models.csv')

This is caused by lines 38 and 42 presuming "MOD" dir is under resourcedir, it is not.

Changing this
model_tab_filename = FreeCAD.getResourceDir()+ "Mod/Idf/lib/footprints_models.csv"

## path to directory containing step models

step_path=FreeCAD.getResourceDir()+ "Mod/Idf/lib/"
to this
model_tab_filename = FreeCAD.getHomePath()+ "/Mod/Idf/idflibs/footprints_models.csv"

## path to directory containing step models

step_path=FreeCAD.getHomePath()+ "/Mod/Idf/idflibs/"

corrects the problem
TagsNo tags attached.
FreeCAD Information

Activities

barleyman

2014-03-25 14:46

reporter  

test idf.zip (10,834 bytes)

Related Changesets

FreeCAD: master d40d5a3e

2014-03-25 16:07:20

barleyman

Details Diff
Update Idf.py

Fixes for bugs 0001491, 0001492, 0001493
Affected Issues
0001491, 0001492, 0001493
mod - src/Mod/Idf/Idf.py Diff File

FreeCAD: master 69044c6b

2014-03-29 13:00:41

wmayer

Details Diff
Merge branch 'patch-1' of https://github.com/Barleyman/FreeCAD_sf_master Affected Issues
0001491, 0001492, 0001493
mod - src/Mod/Idf/Idf.py Diff File

Issue History

Date Modified Username Field Change
2014-03-25 14:46 barleyman New Issue
2014-03-25 14:46 barleyman File Added: test idf.zip
2014-03-29 12:55 wmayer Changeset attached => FreeCAD Master master 69044c6b
2014-03-29 12:56 wmayer Status new => closed
2014-03-29 12:56 wmayer Resolution open => fixed
2019-07-30 22:40 Kunda1 Changeset attached => FreeCAD master d40d5a3e