|
|
|
@ -54,28 +54,29 @@ class AHB_View_Annotate:
|
|
|
|
|
|
|
|
|
|
# Create a new balloon if needed |
|
|
|
|
if balloon is None: |
|
|
|
|
partName = partLink.Name |
|
|
|
|
|
|
|
|
|
balloonName = partName + "_Balloon" |
|
|
|
|
|
|
|
|
|
balloon = doc.addObject("TechDraw::DrawViewBalloon", balloonName) |
|
|
|
|
balloon.SourceView = overlay_view |
|
|
|
|
|
|
|
|
|
balloon.addProperty("App::PropertyXLink", "Assembly_handbook_Source", "Assembly_handbook") |
|
|
|
|
balloon.Assembly_handbook_Source = (partLink, partLink.Name) |
|
|
|
|
|
|
|
|
|
balloon.addProperty("App::PropertyFloat", "Assembly_handbook_OriginOffsetX", "Assembly_handbook") |
|
|
|
|
balloon.addProperty("App::PropertyFloat", "Assembly_handbook_OriginOffsetY", "Assembly_handbook") |
|
|
|
|
|
|
|
|
|
page.addView(balloon) |
|
|
|
|
|
|
|
|
|
workbench.techDrawExtensions.updateBalloon(balloon) |
|
|
|
|
|
|
|
|
|
balloon.X = int(balloon.OriginX) + 20 |
|
|
|
|
balloon.Y = int(balloon.OriginY) + 20 |
|
|
|
|
|
|
|
|
|
if not workbench.techDrawExtensions.isNewPartInView(view, partLink): |
|
|
|
|
balloon.ViewObject.Visibility = False |
|
|
|
|
if workbench.techDrawExtensions.isNewPartInView(view, partLink): |
|
|
|
|
partName = partLink.Name |
|
|
|
|
|
|
|
|
|
balloonName = partName + "_Balloon" |
|
|
|
|
|
|
|
|
|
balloon = doc.addObject("TechDraw::DrawViewBalloon", balloonName) |
|
|
|
|
balloon.SourceView = overlay_view |
|
|
|
|
|
|
|
|
|
balloon.addProperty("App::PropertyXLink", "Assembly_handbook_Source", "Assembly_handbook") |
|
|
|
|
balloon.Assembly_handbook_Source = (partLink, partLink.Name) |
|
|
|
|
|
|
|
|
|
balloon.addProperty("App::PropertyFloat", "Assembly_handbook_OriginOffsetX", "Assembly_handbook") |
|
|
|
|
balloon.addProperty("App::PropertyFloat", "Assembly_handbook_OriginOffsetY", "Assembly_handbook") |
|
|
|
|
|
|
|
|
|
page.addView(balloon) |
|
|
|
|
|
|
|
|
|
workbench.techDrawExtensions.updateBalloon(balloon) |
|
|
|
|
|
|
|
|
|
balloon.X = int(balloon.OriginX) + 20 |
|
|
|
|
balloon.Y = int(balloon.OriginY) + 20 |
|
|
|
|
|
|
|
|
|
if not workbench.techDrawExtensions.isNewPartInView(view, partLink): |
|
|
|
|
balloon.ViewObject.Visibility = False |
|
|
|
|
else: |
|
|
|
|
workbench.techDrawExtensions.updateBalloon(balloon) |
|
|
|
|
|
|
|
|
|