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


      #3
      Hola tardi44 y Jesse.
      Se pudo resolver lo de añadir texto al rectangulo? Para que puedas compartir la herramienta? Gracias.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Nightmaregpu, Yesterday, 10:55 AM
      4 responses
      26 views
      0 likes
      Last Post NinjaTrader_Gaby  
      Started by PH_GMT, 02-12-2025, 12:40 PM
      10 responses
      62 views
      0 likes
      Last Post NinjaTrader_Gaby  
      Started by Ringer13, Yesterday, 01:59 AM
      2 responses
      18 views
      0 likes
      Last Post Ringer13  
      Started by pjsmith, Yesterday, 09:58 AM
      2 responses
      37 views
      0 likes
      Last Post pjsmith
      by pjsmith
       
      Started by MiCe1999, 01-29-2025, 07:04 PM
      1 response
      34 views
      1 like
      Last Post icebergdelphi  
      Working...
      X