Hi, thanks first for this wonderfull tool.
I use it with FC16 and now try to make it work in FC18. I installed trough Addon manager but get error
when I try to open 'assign model'. I undertand this may be problem with different database format, so I exported in FC16 and try to import in FC18 but no zip file created in FC16, only .FPCB, not recognised in FC18.
Thanks for any help.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
database format is different but this should not be a problem (you will only lose categories). Are there any errors in Report view or Python Console (from FC)?
Can you paste also name of your database file?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I imported a previously complete board and got "Error partExist(): 'AttributeError' object has no attribute 'message' ' for each components. Then I tried assign model for one of then and got :
"
Running the Python command 'cmdPartAssignModel' failed:
Traceback (most recent call last):
File "C:\Users###l\AppData\Roaming\FreeCAD\Mod\pcb\PCBcommands.py", line 60, in Activated
dial = dodajElement()
File "C:\Users###l\AppData\Roaming\FreeCAD\Mod\pcb\command\PCBassignModel.py", line 840, in init
self.modelsList.reloadList()
File "C:\Users###\AppData\Roaming\FreeCAD\Mod\pcb\command\PCBassignModel.py", line 785, in reloadList
for i in self.sql.getAllModelsByCategory(0):
File "C:\Users###l\AppData\Roaming\FreeCAD\Mod\pcb\PCBdataBase.py", line 557, in getAllModelsByCategory
return self.session.query(Models).filter(Models.categoryID == categoryID)
"
The name of my bdd is freecad.bdd
Last edit: SeB30 2020-05-09
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
Download (update) version from github -> https://github.com/marmni/FreeCAD-PCB
This version will not solve your problems but will display a valid error message.
It looks like some problems with the database session: /. Can you send me your * .db file (database file) - for test only. Also check the read/write permissions for the folder where you store *.db file ( by default it will be C:\Users###\AppData\Roaming\FreeCAD\Mod\pcb\data).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
update made today, when I try to assign model to one component :
"
Running the Python command 'cmdPartAssignModel' failed:
Traceback (most recent call last):
File "C:\Users---\AppData\Roaming\FreeCAD\Mod\pcb\PCBcommands.py", line 60, in Activated
dial = dodajElement()
File "C:\Users---\AppData\Roaming\FreeCAD\Mod\pcb\command\PCBassignModel.py", line 840, in init
self.modelsList.reloadList()
File "C:\Users---\AppData\Roaming\FreeCAD\Mod\pcb\command\PCBassignModel.py", line 785, in reloadList
for i in self.sql.getAllModelsByCategory(0):
File "C:\Users---\AppData\Roaming\FreeCAD\Mod\pcb\PCBdataBase.py", line 560, in getAllModelsByCategory
return self.session.query(Models).filter(Models.categoryID == categoryID)
'NoneType' object has no attribute 'query'
"
RW are ok for user on folder and db file (at least, no changed from FC16) BUT db file is not in folder C:\Users---\AppData\Roaming\FreeCAD\Mod\pcb\data, it's in C:\Users---\Documents\PCB_FreeCAD with models and path is ok in preferences.
I will send db in PM.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I have a file, thx. So, step by step, how convert your file to current db version
change the name to 'freecad.cfg' (and choose this file in FC_PCB settings as yours database file), not 'freecad.bdd'
after setting a new database file (freecad.cfg) open "Assign models" window
you will see info that you have an old database type -> click OK
after a few seconds you will see info that db is converted
script will automatically generate a new 'freecad.db' file (from now on it is the current database) - old file will be renamed to 'freecad.cfg_old' (everything will change automatically in FreeCAD)
after conversion you will see some errors in Report view - ignore them
after conversion all categories will be lost - unfortunatelly
Problem is that you changed the file extension from * .cfg to * .db. This is not ok because * .cfg is a normal txt file, where * .db is a binary file.
If you have any problems let me know, I will send you a converted file.
Hi,
db convertion seems to be ok, categories are still here !
What I had lost seems to be nearly all placement model coordinates when I import new board.
(more precisely, observed on one component : translation and rotation values are same but real placement on board is not preserved)
I also have errors like that :
"
Part::Compound / Compound: Links go out of the allowed scope
Too old *.col file. It is necessary to generate a new one.
"
Thanks fo your help.
Last edit: SeB30 2020-05-19
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
"What I had lost seems to be nearly all placement model coordinates when I import new board.
(more precisely, observed on one component : translation and rotation values are same but real placement on board is not preserved)"
Current version uses a different algorithm to correctly position models in the 3D area, that's why models have the wrong position (after converting from old to new db file format).
"Too old .col file. It is necessary to generate a new one."
Thi is just information. PCB workbench works on these .col files - they are generated from stp/igs files. Script will generate a .col if it is missing for 3D model, or if the 3D model is changed.
"Part::Compound / Compound: Links go out of the allowed scope"
This is info. from FC - if the model does not load correctly, you need to regenerate the igs/stp file.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi marius,
I was using a FC0.16 with an "old" database format that was stored on a server ! (to be honest I didn't change the configuration for a long time and can't remember how I made that possible ! :)
How can I point to that old database in order to convert it to new DB style using FC0.18 / py3.6 ? Is there a thread somewhere with everything explain ? I quickly read over... :/
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi, thanks first for this wonderfull tool.
I use it with FC16 and now try to make it work in FC18. I installed trough Addon manager but get error
when I try to open 'assign model'. I undertand this may be problem with different database format, so I exported in FC16 and try to import in FC18 but no zip file created in FC16, only .FPCB, not recognised in FC18.
Thanks for any help.
Hi,
database format is different but this should not be a problem (you will only lose categories). Are there any errors in Report view or Python Console (from FC)?
Can you paste also name of your database file?
Hi,
I imported a previously complete board and got "Error partExist(): 'AttributeError' object has no attribute 'message' ' for each components. Then I tried assign model for one of then and got :
"
Running the Python command 'cmdPartAssignModel' failed:
Traceback (most recent call last):
File "C:\Users###l\AppData\Roaming\FreeCAD\Mod\pcb\PCBcommands.py", line 60, in Activated
dial = dodajElement()
File "C:\Users###l\AppData\Roaming\FreeCAD\Mod\pcb\command\PCBassignModel.py", line 840, in init
self.modelsList.reloadList()
File "C:\Users###\AppData\Roaming\FreeCAD\Mod\pcb\command\PCBassignModel.py", line 785, in reloadList
for i in self.sql.getAllModelsByCategory(0):
File "C:\Users###l\AppData\Roaming\FreeCAD\Mod\pcb\PCBdataBase.py", line 557, in getAllModelsByCategory
return self.session.query(Models).filter(Models.categoryID == categoryID)
"
The name of my bdd is freecad.bdd
Last edit: SeB30 2020-05-09
Hi,
Download (update) version from github -> https://github.com/marmni/FreeCAD-PCB
This version will not solve your problems but will display a valid error message.
It looks like some problems with the database session: /. Can you send me your * .db file (database file) - for test only. Also check the read/write permissions for the folder where you store *.db file ( by default it will be C:\Users###\AppData\Roaming\FreeCAD\Mod\pcb\data).
Hi,
update made today, when I try to assign model to one component :
"
Running the Python command 'cmdPartAssignModel' failed:
Traceback (most recent call last):
File "C:\Users---\AppData\Roaming\FreeCAD\Mod\pcb\PCBcommands.py", line 60, in Activated
dial = dodajElement()
File "C:\Users---\AppData\Roaming\FreeCAD\Mod\pcb\command\PCBassignModel.py", line 840, in init
self.modelsList.reloadList()
File "C:\Users---\AppData\Roaming\FreeCAD\Mod\pcb\command\PCBassignModel.py", line 785, in reloadList
for i in self.sql.getAllModelsByCategory(0):
File "C:\Users---\AppData\Roaming\FreeCAD\Mod\pcb\PCBdataBase.py", line 560, in getAllModelsByCategory
return self.session.query(Models).filter(Models.categoryID == categoryID)
'NoneType' object has no attribute 'query'
"
RW are ok for user on folder and db file (at least, no changed from FC16) BUT db file is not in folder C:\Users---\AppData\Roaming\FreeCAD\Mod\pcb\data, it's in C:\Users---\Documents\PCB_FreeCAD with models and path is ok in preferences.
I will send db in PM.
Hi,
ok. I will check it as soon as I get this file.
Hi, just to be sure, did you get my db file by private mail ?
Hi,
no (I also checked spam). Send this file directly to me - email is in each * .py file (in the header, from the PCB module).
Hi,
I have a file, thx. So, step by step, how convert your file to current db version
script will automatically generate a new 'freecad.db' file (from now on it is the current database) - old file will be renamed to 'freecad.cfg_old' (everything will change automatically in FreeCAD)
after conversion you will see some errors in Report view - ignore them
Problem is that you changed the file extension from * .cfg to * .db. This is not ok because * .cfg is a normal txt file, where * .db is a binary file.
If you have any problems let me know, I will send you a converted file.
Last edit: Mariusz 2020-05-18
Hi,
db convertion seems to be ok, categories are still here !
What I had lost seems to be nearly all placement model coordinates when I import new board.
(more precisely, observed on one component : translation and rotation values are same but real placement on board is not preserved)
I also have errors like that :
"
Part::Compound / Compound: Links go out of the allowed scope
Too old *.col file. It is necessary to generate a new one.
"
Thanks fo your help.
Last edit: SeB30 2020-05-19
Hi,
"What I had lost seems to be nearly all placement model coordinates when I import new board.
(more precisely, observed on one component : translation and rotation values are same but real placement on board is not preserved)"
Current version uses a different algorithm to correctly position models in the 3D area, that's why models have the wrong position (after converting from old to new db file format).
"Too old .col file. It is necessary to generate a new one."
Thi is just information. PCB workbench works on these .col files - they are generated from stp/igs files. Script will generate a .col if it is missing for 3D model, or if the 3D model is changed.
"Part::Compound / Compound: Links go out of the allowed scope"
This is info. from FC - if the model does not load correctly, you need to regenerate the igs/stp file.
Hi marius,
I was using a FC0.16 with an "old" database format that was stored on a server ! (to be honest I didn't change the configuration for a long time and can't remember how I made that possible ! :)
How can I point to that old database in order to convert it to new DB style using FC0.18 / py3.6 ? Is there a thread somewhere with everything explain ? I quickly read over... :/
I found it ! Sorry for stupid Q, I don't use FC for a long time :p