User Tools

Site Tools


macros:function:timelines.importmarkersfromstring

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
macros:function:timelines.importmarkersfromstring [2023/04/03 12:07] icke_siegenmacros:function:timelines.importmarkersfromstring [2023/04/04 06:41] (current) – external edit 127.0.0.1
Line 21: Line 21:
 **This article was written with massive help from Gregory Haynes; I couldn't have figured this out myself.** **This article was written with massive help from Gregory Haynes; I couldn't have figured this out myself.**
  
-There is also the function [[https://api.avolites.com/16.0/api/Timelines.ImportMarkers.html|Timelines.ImportMarkers]], however that would expect an XML object as importMappingVersion while this fuction here parses a string which is much easier to handle.+There is also the function [[https://api.avolites.com/16.0/api/Timelines.ImportMarkers.html|Timelines.ImportMarkers]], however that would expect an XML object as importMappingVersion while this function here parses a string which is much easier to handle.
  
 == Arguments == == Arguments ==
Line 43: Line 43:
 ''<Version id='1' name='2020' headerRow='true'><externalId name='#' index='0' /><legend name='Name' index='1' /><time name='Start' index='2' format=%%''%% /></Version>'' (again the angled brackets need to be written as entities ''&lt;'' and ''&gt;'' when using this). ''<Version id='1' name='2020' headerRow='true'><externalId name='#' index='0' /><legend name='Name' index='1' /><time name='Start' index='2' format=%%''%% /></Version>'' (again the angled brackets need to be written as entities ''&lt;'' and ''&gt;'' when using this).
  
-> There is also an XML file included with the personality library (e.g. ''C:\Program Files\Avolites\Titan\FixtureLibrary\MarkerImportMapping.xml'') which includes multiple options that can be selected in the UI in the context menu. There is also the provision for a similar file to be in the user fixture library directory. +  * **csvFilePath** is the absolute path (including filename) to the file which is to be imported, e.g. ''"C:\Users\{username}\Documents\Titan\Markers\test.csv"''
-<file xml> +  * **frameRate** is the framerate to import. This is important to convert frame numbers with different framerates (not tested yet). The API lists [[https://api.avolites.com/16.0/api/Avolites.Acw.Titan.AcwFrameRate.html|AcwFrameRate]] as Enumeration: 
-<MarkerImportMappings schemaVersion="1.0" xmlns="http://avolites.com/MakerImportMapping.xsd">  +
-  <MarkerImportMapping id="reaper" name="Reaper"> +
-    <Version id="1" name="2020" headerRow="true"> +
-      <externalId name="#" index="0" /> +
-      <legend name="Name" index="1" /> +
-      <time name="Start" index="2" format="h':'mm':'ss':'ff" /> +
-    </Version> +
-  </MarkerImportMapping> +
-</MarkerImportMappings> +
-</file> +
-> You should recognise the Version section as the bit being passed into the function. Perhaps if the string contained "Reaper", "Reaper:2020" or "reaper:1" it ought to be able to lookup the appropriate mapping from the library. +
- +
-  * **csvFilePath** is the absolute path (including filenameto the file whic is to be imported, e.g. ''"C:\Users\{username}\Documents\Titan\Markers\test.csv"''+
-  * **frameRate** is the framerate to import. This is importan to convert frame numbers with different framerates (not tested yet). The API lists [[https://api.avolites.com/16.0/api/Avolites.Acw.Titan.AcwFrameRate.html|AcwFrameRate]] as Enumeration: +
  
 ^ Value ^ Description | ^ Value ^ Description |
macros/function/timelines.importmarkersfromstring.1680523652.txt.gz · Last modified: 2023/04/03 12:07 by icke_siegen

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki