If you just want to display and erase the message, why not use the CustomGraphicsText object?
http://help.autodesk.com/view/fusion360/ENU/?guid=GUID-4BF0DB87-C2BB-452C-BCD0-8BF6FE211171

Here is a sample code that I tested, though it is incomplete.
#Fusion360API Python script
import adsk.core, adsk.fusion, traceback
import time
_app = adsk.core.Application.cast(None)
_ui = adsk.core.UserInterface.cast(None)
def run(context):
try:
global _app, _ui
_app = adsk.core.Application.get()
_ui = _app.userInterface
cGFact = CustomGraphicsFactry('piyo')
msg = 'Hello World'
font = 'Arial'
showTime = 2.0
cGFact.showTimerText(msg, font, showTime)
del cGFact
except:
if _ui:
_ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
class CustomGraphicsFactry():
_app = adsk.core.Application.cast(None)
_cgGroup = adsk.fusion.CustomGraphicsGroup.cast(None)
_id =''
def __init__(self, id :str):
self._app = adsk.core.Application.get()
self._id = id
def __del__(self):
self.removeCG()
def removeCG(self):
des :adsk.fusion.Design = self._app.activeProduct
cgs = [cmp.customGraphicsGroups for cmp in des.allComponents]
cgs = [cg for cg in cgs if cg.count > 0]
if len(cgs) < 1: return
for cg in cgs:
gps = [c for c in cg]
gps.reverse()
for gp in gps:
if gp.id != self._id:
continue
gp.deleteMe()
def refreshCG(self):
self.removeCG()
des :adsk.fusion.Design = self._app.activeProduct
comp :adsk.fusion.Component = des.activeComponent
self._cgGroup = comp.customGraphicsGroups.add()
self._cgGroup.id = self._id
def showTimerText(
self,
formattedText,
font,
showTime
):
self.refreshCG()
mat = adsk.core.Matrix3D.create()
cgtxt = self._cgGroup.addText(formattedText, font, 1, mat)
pntZero = adsk.core.Point3D.create(0,0,0)
billBoard = adsk.fusion.CustomGraphicsBillBoard.create(pntZero)
billBoard.billBoardStyle = adsk.fusion.CustomGraphicsBillBoardStyles.ScreenBillBoardStyle
cgtxt.billBoarding = billBoard
viewScale = adsk.fusion.CustomGraphicsViewScale.create(100, pntZero)
cgtxt.viewScale = viewScale
vp = _app.activeViewport
x = vp.width * 0.3
y = vp.height * 0.1
viewPlace = adsk.fusion.CustomGraphicsViewPlacement.create(pntZero,
adsk.fusion.ViewCorners.upperLeftViewCorner,
adsk.core.Point2D.create(x,y))
cgtxt.viewPlacement = viewPlace
vp.refresh()
time.sleep(showTime)
self.removeCG()