assembly_handbook/ahb_utils.py
2022-12-31 17:05:06 +01:00

8 lines
234 B
Python

import FreeCADGui as Gui
def getCurrentView():
currentSel = Gui.Selection.getSelection()
if len(currentSel) == 1 and currentSel[0].TypeId == 'TechDraw::DrawViewPart':
return currentSel[0]
else:
return None