Skip to content

Plugin crashes when no ShapeColor  #224

@phodina

Description

@phodina

Hi,
I've recently wanted to export WRL model to Kicad of this component.

However I encountered some issue and don't know how to fix it. The plugin during export crashes as the property ShapeColor is not set.

18:22:54  Running the Python command 'ksuToolsExportModel' failed:
Traceback (most recent call last):
  File "/home/cylon2p0/.local/share/FreeCAD/Mod/kicadStepUpMod/./kicadStepUpCMD.py", line 1292, in Activated
    routineScaleVRML()
  File "/home/cylon2p0/.local/share/FreeCAD/Mod/kicadStepUpMod/./kicadStepUptools.py", line 7571, in routineScaleVRML
    lbl=go_export(fullFilePathName)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/cylon2p0/.local/share/FreeCAD/Mod/kicadStepUpMod/./kicadStepUptools.py", line 2717, in go_export
    export(objs, fPathName, 0.3937, lbl)
  File "/home/cylon2p0/.local/share/FreeCAD/Mod/kicadStepUpMod/./kicadStepUptools.py", line 2331, in export
    color.append(FreeCADGui.ActiveDocument.getObject(obj.Name).ShapeColor)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

'Gui.ViewProviderDocumentObject' object has no attribute 'ShapeColor'KiCadStepUpWB.Deactivated()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions