コード例 #1
0
 def display_getResolution(self, request, context):
     try:
         obj = FreeCAD.ActiveDocument.getObjectsByLabel(request.objLabel)[0]
         return obj.Proxy.getResolution(obj)
     except IndexError:
         FreeCAD.Console.PrintError(
             "Object not found with label " + request.objLabel + "\n")
         answ = Proto.DisplayResolutionAnswer(x = 0, y = 0)
         return answ
コード例 #2
0
 def getResolution(self, obj):
     answ = Proto.DisplayResolutionAnswer(x=obj.ResolutionX,
                                          y=obj.ResolutionY)
     return answ