Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Adding Text to the Rectangle Extendable drawing tool (it works but workspace crashes)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Adding Text to the Rectangle Extendable drawing tool (it works but workspace crashes)

    Hello all,
    I'm trying to add text to the Rectangle Extendable drawing tool (Rectangle Tool - Extendable from all sides - NinjaTrader Ecosystem​).
    The drawing tool is working but when I try to re-open the workspace, I get these errors in the log:

    ' Chart rendering failed. There is likely a problem with a chart object's OnRender method.
    D2D error = 'HRESULT: [0x88990012], Module: [SharpDX.Direct2D1], ApiCode: [D2DERR_WRONG_FACTORY/WrongFactory],
    Message: Objects used together must be created from the same factory instance.'

    ' A direct X error has occurred while rendering the chart:
    HRESULT: [0x88990012], Module: [SharpDX.Direct2D1], ApiCode: [D2DERR_WRONG_FACTORY/WrongFactory],
    Message: Objects used together must be created from the same factory instance. '

    I can't figure out how to adapt the script to prevent these errors. Can someone help me please?

    Here is the script:
    Rect Ext with Text script.txt

    Thanks

    #2
    Hello tardi44,

    The error you are getting is because some resource you are creating is being created in an incorrect way. That may include brushes or other sharpdx types. I would suggest looking at the following link that goes over how to correctly create resources for rendering that also allow for render target changes. You can compare that against the changes you made to check that you are creating your own resources correctly.
    JesseNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by ageeholdings, Today, 07:43 AM
    0 responses
    7 views
    0 likes
    Last Post ageeholdings  
    Started by pibrew, Today, 06:37 AM
    0 responses
    4 views
    0 likes
    Last Post pibrew
    by pibrew
     
    Started by rbeckmann05, Yesterday, 06:48 PM
    1 response
    14 views
    0 likes
    Last Post bltdavid  
    Started by llanqui, Today, 03:53 AM
    0 responses
    6 views
    0 likes
    Last Post llanqui
    by llanqui
     
    Started by burtoninlondon, Today, 12:38 AM
    0 responses
    12 views
    0 likes
    Last Post burtoninlondon  
    Working...
    X