diff --git a/exporter/SynthesisFusionAddin/src/UI/ConfigCommand.py b/exporter/SynthesisFusionAddin/src/UI/ConfigCommand.py index c50c7feed..c63bc2ca6 100644 --- a/exporter/SynthesisFusionAddin/src/UI/ConfigCommand.py +++ b/exporter/SynthesisFusionAddin/src/UI/ConfigCommand.py @@ -312,9 +312,16 @@ def notify(self, args): savepath = processedFileName adsk.doEvents() + design = gm.app.activeDocument.design - name = design.rootComponent.name.rsplit(" ", 1)[0] - version = design.rootComponent.name.rsplit(" ", 1)[1] + + name_split: list[str] = design.rootComponent.name.split(" ") + if len(name_split) < 2: + gm.ui.messageBox("Please open the robot design you would like to export", "Synthesis: Error") + return + + name = name_split[0] + version = name_split[1] selectedJoints, selectedWheels = jointConfigTab.getSelectedJointsAndWheels() selectedGamepieces = gamepieceConfigTab.getGamepieces()