Inventor Engineer-to-Order

Reply
Distinguished Contributor
ludesroc
Posts: 172
Registered: ‎05-03-2005
Message 1 of 4 (174 Views)
Accepted Solution

Client Graphic

174 Views, 3 Replies
11-01-2012 09:43 AM

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

Ludesroc

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

Works great!

 

Thanks Casey!

Board Manager
Jon.Balgley
Posts: 249
Registered: ‎08-23-2006
Message 2 of 4 (165 Views)

Re: Client Graphic

11-01-2012 05:27 PM in reply to: ludesroc

Hi --

 

This is under investigation ... apparently there are some defects in this area ... try different values for :VerticalAlignment ... more information tomorrow.



Jon Balgley
Autodesk Configurator 360 / Inventor ETO team
Autodesk, Inc.
Employee
Casey.Motherway
Posts: 16
Registered: ‎06-19-2012
Message 3 of 4 (148 Views)

Re: Client Graphic

11-02-2012 09:33 AM in reply to: ludesroc

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

Distinguished Contributor
ludesroc
Posts: 172
Registered: ‎05-03-2005
Message 4 of 4 (141 Views)

Re: Client Graphic

11-02-2012 10:27 AM in reply to: Casey.Motherway

Works great!

 

Thanks Casey!

Ludesroc
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Manufacturing Community
The Manufacturing Community provides additional access to tips, tutorials, blogs and networking with peers.