Hi,
I'm trying to add a simple text (client graphic) on screen...Can somebody point me in the right direction???
Child testCG As :CGText
Text = "Test"
AnchorPosition = Point(0,0,0)
AnchorCorner = :Left
visible? = True
position = Point(5,5,0)
Scalable? = True
Bold? = False
Italic? = False
Font = %%InventorApplication.GeneralOptions.TextAppearance
FontSize = %%InventorApplication.GeneralOptions.TextSize
HorizontalAlignment = :Left
VerticalAlignment = :BaseLine
End Child
I get :
Exception in function cg_drawText
Unspecified error (Exception from HRESULT: 0x80004005 (E_FAIL))
Regards,
Luc
Solved! Go to Solution.
Solved by ludesroc. Go to Solution.
Solved by Casey.Motherway. Go to Solution.
Hi --
This is under investigation ... apparently there are some defects in this area ... try different values for :VerticalAlignment ... more information tomorrow.
As Jon mentioned, there seems to be a defect in CGText VerticalAlignment. If it is set to :BaseLine it will fail. But if you set it to one of the other choices (Middle, Upper, Lower) it seems to be ok. I will look into this further and file the issue in our tracking system.
Also, the choices for AnchorCorner are: None, TopLeft, TopRight, BottomLeft, BottomRight. You have it set to :Left, which is not a valid choice.
Child TheText As :CGText, Quantity = Quantity2D Text = "Test" AnchorPosition = Point(0,0,0) AnchorCorner = :None visible? = True position = Point(5,5,0) Scalable? = True Bold? = False Italic? = False Font = %%InventorApplication.GeneralOptions.TextAppearance FontSize = %%InventorApplication.GeneralOptions.TextSize HorizontalAlignment = :Left VerticalAlignment = :Lower End Child
Regards,
-Casey