Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Ressource file for distribution

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

    Ressource file for distribution

    Hello,

    I have created an Addon that I want to distribute to my customers.

    My Addon uses an xaml file that I would like to include in the distribution but I don't know how to structure my zip file to accomodate my needs.

    In my development computer my file is locate under the Addon folder. I read in previous forum posts that I need to include the xaml file under the templates folder for distribution.

    In my Addon code I retrieve the file from the Addons Folder :
    using (System.IO.Stream assemblyResourceStream = GetManifestResourceStream("AddOns.AddOnExampleTab2 .xaml"))

    How can I change this to the templated folder ?

    I put the file under the templates folder and change my code to :
    I tried using (System.IO.Stream assemblyResourceStream = GetManifestResourceStream("templates.AddOnExampleT ab2.xaml"))

    but it does not work ...



    #2
    Hello blar58,

    Any additional resources will need to be dragged and dropped into the .zip export in the relational folder. Typically, non-xaml files would be put in the templates\YourFolderName, but for xaml files you can put those in a folder named Addons.

    Below is a link to the help guide.


    And a link to an example you look at that includes and streams a xaml file.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Just to mak sure If I understand this properly.

      In my distribution zip file on top of indicator dll , cs file info xml file and Additional References I have created 3 folders

      1) templates folder where I put Chart templates, Skins, Trading hours and My Ressource files ( images etc .... )
      2) workspaces folder where I put workspaces related to my product
      3) AddOns folder where I put the xaml file needed for my Addon to work.


      Click image for larger version

Name:	Distribution.png
Views:	140
Size:	5.8 KB
ID:	1225671


      Is that fine ?

      Comment


        #4
        Hello blar58,

        That is correct!

        What is happening when you test importing this on a new system?
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Did not test it yet.

          Will keep you updated

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by pmachiraju, 11-01-2023, 04:46 AM
          8 responses
          147 views
          0 likes
          Last Post rehmans
          by rehmans
           
          Started by mattbsea, Today, 05:44 PM
          0 responses
          5 views
          0 likes
          Last Post mattbsea  
          Started by RideMe, 04-07-2024, 04:54 PM
          6 responses
          33 views
          0 likes
          Last Post RideMe
          by RideMe
           
          Started by tkaboris, Today, 05:13 PM
          0 responses
          5 views
          0 likes
          Last Post tkaboris  
          Started by GussJ, 03-04-2020, 03:11 PM
          16 responses
          3,282 views
          0 likes
          Last Post Leafcutter  
          Working...
          X