Tool to create tables in config file

@CobraLAD The following script will not in any way disparage your accomplishment. Scripting in Excel is a world that I never worked with. So hats off to you. 👍

Some weeks ago I wrote for my own purpose a python script with a similar destination. And because not all people like macros in MS Office or LibreOffice I decided to show the script here. I adapted it to @CobraLAD's destination in this thread. In my eyes the script is self explanatory with the additional comments. Set the variables to your need or adapt the script to your need.
There is no special license to it, but telling the source of the original would be nice.
The script works in blender python scripting workspace as well as in other Python installations.
Code:
import sys,os
# ==============================================================================================
# For https://forums.auran.com/threads/tool-to-create-tables-in-config-file.176963 by ek.skirl
# ==============================================================================================
filepath      = os.path.expanduser("~/Desktop/")  # Here the file is stored at the desktop
filename      = "queue_container_list.txt"  # with the name queue_container_list.txt
queuebasename = "queue"   # Used for queue tag name followed by a running number
# ----------------------------------------------------------------------------------------------
# The delimiter symbol is here '?' but may be setted in the variable.
# One or more blanks before and after the delimiter possible
# List entry format 1: "<kuid...>?name?queuesize",
# List entry format 2: "<kuid...>?queuesize?name",
# List entry format 3: "<kuid...>?queuesize",
# List entry format 4: "<kuid...>?name", with setted queuesize
# List entry format 5: "<kuid...>", with setted queuesize
# ----------------------------------------------------------------------------------------------
queuesize    = 256
delimiter    = " "
format       = 4
withkuidlist = True   # The sub container "allowed-products" contains the kuids? (False/True)
# ----------------------------------------------------------------------------------------------
assetlist = [ # --------------------------------------------------------------------------------
"<kuid2:215489:110001:1> aCTS PRODUCT CATEGORY Container 10ft sc",
"<kuid:215489:100065> New Route",
"<kuid2:215489:110002:2> aCTS PRODUCT CATEGORY Container 10ft hc",
"<kuid:215489:100066> New Route - Default",
"<kuid:215489:100054> REGISTERING ROUTE",
"<kuid:215489:100055> REGISTERING SESSION - Empty",
"<kuid2:215489:1100200:1> aCTS CONTAINER Texture Group V1",
] # --------------------------------------------------------------------------------------------
# ----------------------------------------------------------------------------------------------
tagnamesize = "size                 "
tagnameprod = "product-kuid         "
tagnameicnt = "inital-count         0"
allprod     = "allowed-products"
# ----------------------------------------------------------------------------------------------
indent = "    "
# ==============================================================================================
cr  ="""
"""
cr1indent =cr+indent
cr2indent =cr1indent+indent
cr3indent =cr2indent+indent
# ----------------------------------------------------------------------------------------------
rnr = 0
allowedproductslist = ""
for s in assetlist:
    pos1 = s.find(">")
    allowedproductslist += cr3indent+str(rnr)+indent+indent+s[:pos1+1].strip()
    rnr += 1
rnr = 0
file = open(filepath+filename, "w")
sys.stdout = file    # Set standard stdout to file
for s in assetlist:
    pos1 = s.find(">")
    trainzkuid = s[:pos1+1].strip()
    size = queuesize
    if   format == 1: # List entry format 1: "<kuid...>?name?queuesize",
        pos2 = s.rfind(" ")
        size = int(s[pos2:])
        # name = s[pos1+1:pos2].strip()
    elif format == 2: # List entry format 2: "<kuid...>?queuesize?name",
        pos2 = s.find(" ",pos1)
        size = int(s[pos2:])
        # name = s[pos2:].strip()
    elif format == 3: # List entry format 3: "<kuid...>?queuesize",
        size = int(s[pos1:])
    elif format == 4: # List entry format 4: "<kuid...>?name", with setted queuesize
        # name = s[pos1+1:].strip()
        xxx = 123 # Dummy instruction for syntax purpose only
    rnr += 1
    text = indent+queuebasename+str(rnr)+cr1indent+"{"+cr2indent
    text += tagnamesize+str(size)+cr2indent
    text += tagnameprod+trainzkuid+cr2indent
    text += tagnameicnt+cr2indent
    text += allprod+cr2indent+"{"
    if withkuidlist: text += allowedproductslist
    text += cr2indent+"}"
    text += cr1indent+"}"+cr
    print(text)
file.close()
sys.stdout = sys.__stdout__    # Reset to standard stdout
# ==============================================================================================
The resulting textfile looks like follows
Code:
    queue1
    {
        size                 256
        product-kuid         <kuid2:215489:110001:1>
        inital-count         0
        allowed-products
        {
            0        <kuid2:215489:110001:1>
            1        <kuid:215489:100065>
            2        <kuid2:215489:110002:2>
            3        <kuid:215489:100066>
            4        <kuid:215489:100054>
            5        <kuid:215489:100055>
            6        <kuid2:215489:1100200:1>
        }
    }

    queue2
    {
        size                 256
        product-kuid         <kuid:215489:100065>
        inital-count         0
        allowed-products
        {
            0        <kuid2:215489:110001:1>
            1        <kuid:215489:100065>
            2        <kuid2:215489:110002:2>
            3        <kuid:215489:100066>
            4        <kuid:215489:100054>
            5        <kuid:215489:100055>
            6        <kuid2:215489:1100200:1>
        }
    }

    queue3
    {
        size                 256
        product-kuid         <kuid2:215489:110002:2>
        inital-count         0
        allowed-products
        {
            0        <kuid2:215489:110001:1>
            1        <kuid:215489:100065>
            2        <kuid2:215489:110002:2>
            3        <kuid:215489:100066>
            4        <kuid:215489:100054>
            5        <kuid:215489:100055>
            6        <kuid2:215489:1100200:1>
        }
    }

    queue4
    {
        size                 256
        product-kuid         <kuid:215489:100066>
        inital-count         0
        allowed-products
        {
            0        <kuid2:215489:110001:1>
            1        <kuid:215489:100065>
            2        <kuid2:215489:110002:2>
            3        <kuid:215489:100066>
            4        <kuid:215489:100054>
            5        <kuid:215489:100055>
            6        <kuid2:215489:1100200:1>
        }
    }

    queue5
    {
        size                 256
        product-kuid         <kuid:215489:100054>
        inital-count         0
        allowed-products
        {
            0        <kuid2:215489:110001:1>
            1        <kuid:215489:100065>
            2        <kuid2:215489:110002:2>
            3        <kuid:215489:100066>
            4        <kuid:215489:100054>
            5        <kuid:215489:100055>
            6        <kuid2:215489:1100200:1>
        }
    }

    queue6
    {
        size                 256
        product-kuid         <kuid:215489:100055>
        inital-count         0
        allowed-products
        {
            0        <kuid2:215489:110001:1>
            1        <kuid:215489:100065>
            2        <kuid2:215489:110002:2>
            3        <kuid:215489:100066>
            4        <kuid:215489:100054>
            5        <kuid:215489:100055>
            6        <kuid2:215489:1100200:1>
        }
    }

    queue7
    {
        size                 256
        product-kuid         <kuid2:215489:1100200:1>
        inital-count         0
        allowed-products
        {
            0        <kuid2:215489:110001:1>
            1        <kuid:215489:100065>
            2        <kuid2:215489:110002:2>
            3        <kuid:215489:100066>
            4        <kuid:215489:100054>
            5        <kuid:215489:100055>
            6        <kuid2:215489:1100200:1>
        }
    }
"]
Of course I try to answer any question to it.
 
Last edited:
Oddly enough, @ek.skirl, I had in mind something closer to this when @CobraLAD announced his tool, and had figured to do something similar before seeing his announcement. I find it very interesting what he has been able to accomplish in that environment, although having made extensive Lotus 1-2-3 scripts for one of my previous employers, I cannot say that I am astonished. I am impressed, though, that he was able to pull it off; most people do not seem to have the mindset required for programming anything significant. Good job to both of you. (y)
 
So here is a version 2 with some more adjustable features, espacialy sorting the kuid and additional write the sorted list of the assetdata.
The changeble values you will find in the first lines.
Unfortunatly the version two needs the numpy module for the sortings. The script runs in Blender ad hoc.
The files will be stored at the desktop but you may change the destination too.
Code:
import bpy,sys,os,numpy
# ==============================================================================================
# Creating a queue container list V2
# For https://forums.auran.com/threads/tool-to-create-tables-in-config-file.176963/#post-2009085
# ==============================================================================================
filepath      = os.path.expanduser("~/Desktop/")  # Here the file is stored at the desktop
filename_qcl  = "queue_container_list.txt"  # for queue_container_list.txt file
filename_sal  = "sorted_asset_list.txt"     # for sorted_asset_list.txt file
queuebasename = "queue"   # Used for queue tag name followed by a running number
queuesize     = 256       # Standard queue count value format 4 + 5
# ----------------------------------------------------------------------------------------------
# The delimiter symbol is here '?' but may be setted in the variable for your needs
# One or more blanks before and after the delimiter possible 
# List entry format 1: "<kuid...> ? name ? queuesize",
# List entry format 2: "<kuid...> ? queuesize ? name",
# List entry format 3: "<kuid...> ? queuesize",
# List entry format 4: "<kuid...> ? name",    # all with same setted standard queuesize 
# List entry format 5: "<kuid...>",           # all with same setted standard queuesize 
# ----------------------------------------------------------------------------------------------
delimiter_asl = "?"      # Delimiter character between the string parts for input array
delimiter_sal = ","      # Delimiter character between the string parts for outpu file
format        = 5        # Format of the string we use as source data
withkuidlist  = True     # The sub container "allowed-products" contains the kuids? (False/True)
indent        = "    "   # The indent for the tags and sub containers
# ----------------------------------------------------------------------------------------------
sortkuids            = True   # Shell the value be sorted? (True/False)
sortuseridbynumber   = False  # Shell the userid be sorted as number? (True/False)
#sortuseridascending  = True   # Sort ascending?
sortassetidbynumber  = True   # Shell the assetid be sorted as number? (True/False)
#sortasseridascending = True   # Sort ascending?
# ----------------------------------------------------------------------------------------------
assetlist = [ # --------------------------------------------------------------------------------
    " <kuid2:60238:38800:1>    ",
    " <kuid2:60238:38801:1>    ",
    " <kuid2:114219:100293:1>  ",
    " <kuid2:60238:39045:1>    ",
    " <kuid2:117140:10139:1>   ",
    " <kuid2:240543:1119:1>    ",
    " <kuid2:114219:100868:1>  ",
    " <kuid2:60238:38524:5>    ",
    " <kuid:521966:103380>     ",
    " <kuid:780388:102932>     ",
    " <kuid2:114219:100294:1>  ",
    " <kuid:95230:102616>      ",
    " <kuid:114219:100576>     ",
    " <kuid2:114219:100565:1>  ",
    " <kuid:242944:100182>     ",
    " <kuid:114219:100566>     ",
    " <kuid2:439337:100498:3>  ",
    " <kuid:114219:1170>       ",
    " <kuid:114219:1171>       ",
    " <kuid2:105915:100001:1>  ",
    " <kuid2:517519:40014:1>   ",
    " <kuid2:517519:40013:1>   ",
    " <kuid:242944:100183>     ",
    " <kuid2:351022:25130:1>   ",
    " <kuid2:351022:25131:1>   ",
    " <kuid2:439337:105665:1>  ",
] # --------------------------------------------------------------------------------------------
# ----------------------------------------------------------------------------------------------
# ==============================================================================================
# ### From here don't change any thing #########################################################
# ==============================================================================================
tagnamesize = "size                 "
tagnameprod = "product-kuid         "
tagnameicnt = "inital-count         0"
allprod     = "allowed-products"
# ----------------------------------------------------------------------------------------------
cr  ="""
"""
cr1indent =cr+indent
cr2indent =cr1indent+indent
cr3indent =cr2indent+indent
# ----------------------------------------------------------------------------------------------
maxnamelength    = 1
maxuseridlength  = 1
maxassetidlength = 1
splitassetlist   = []
for s in assetlist:
    f = []
    pos1 = s.find(">")
    pos2 = s.find("<")
    # --- kuid --------------------------
    kuid  = s[pos2+1:pos1].strip()
    parts = kuid.split(":")
    if len(parts[1]) > maxuseridlength: maxuseridlength=len(parts[1])
    if len(parts[2]) > maxuseridlength: maxuseridlength=len(parts[2])
    if sortuseridbynumber:  parts[1] = int(parts[1])
    if sortassetidbynumber: parts[2] = int(parts[2])
    if len(parts) == 3: parts.append("0")
    parts[3]=int(parts[3])
    for i in range(0,len(parts)):
        f.append(parts[i])
    # -----------------------------
    size = queuesize
    pos1 = s.find(delimiter_asl)
    if   format == 1: # List entry format 1: "<kuid...>?name?queuesize",
        pos2 = s.rfind(delimiter_asl)
        f.append(int(s[pos2+1:]))
        f.append(s[pos1+1:pos2].strip())
        l = len(s[pos1+1:pos2].strip())
        if l > maxnamelength: maxnamelength = l
    elif format == 2: # List entry format 2: "<kuid...>?queuesize?name",
        pos2 = s.find(delimiter_asl,pos1+1)
        f.append(int(s[pos1+1:pos2]))
        f.append(s[pos2+1:].strip())
        l = len(s[pos2:].strip())
        if l > maxnamelength: maxnamelength = l
    elif format == 3: # List entry format 3: "<kuid...>?queuesize",
        f.append(int(s[pos1+1:]))
        f.append("")
    elif format == 4: # List entry format 4: "<kuid...>?name", with setted queuesize 
        f.append(size)
        f.append(s[pos1+1:].strip())
        l = len(s[pos1+1:].strip())
        if l > maxnamelength: maxnamelength = l
    elif format== 5: # List entry format 5: "<kuid...>", with setted queuesize
        f.append(size)
        f.append("")
    splitassetlist.append(f)
# ----------------------------------------------------------------------------------------------
if sortkuids:
    columns_ii = [
        ('head',     'S6'),
        ('userid',   'i4'),
        ('assetid',  'i4'),
        ('assetrnr', 'i4'),
        ('size',     'i4'),
        ('name',     'S'+str(maxnamelength)),
    ]
    columns_si = [
        ('head',     'S6'),
        ('userid',   'S'+str(maxuseridlength)),
        ('assetid',  'i4'),
        ('assetrnr', 'i4'),
        ('size',     'i4'),
        ('name',     'S'+str(maxnamelength)),
    ]
    columns_is = [
        ('head',     'S6'),
        ('userid',   'i4'),
        ('assetid',  'S'+str(maxassetidlength)),
        ('assetrnr', 'i4'), 
        ('size',     'i4'), 
        ('name',     'S'+str(maxnamelength)),
    ]
    columns_ss = [
        ('head',     'S6'),
        ('userid',   'S'+str(maxuseridlength)),
        ('assetid',  'S'+str(maxassetidlength)),
        ('assetrnr', 'i4'),
        ('size',     'i4'),
        ('name',     'S'+str(maxnamelength)),
    ]
    # ------------------------------------------------------------------------------------------
    if     sortuseridbynumber and     sortassetidbynumber: columns=columns_ii
    if not sortuseridbynumber and     sortassetidbynumber: columns=columns_si
    if     sortuseridbynumber and not sortassetidbynumber: columns=columns_is
    if not sortuseridbynumber and not sortassetidbynumber: columns=columns_ss
    lsta = [(i[0], i[1], i[2], i[3], i[4], i[5]) for i in splitassetlist]
    npa = numpy.array(lsta, dtype=columns)
    sortedassetlist = numpy.sort(npa, order=['userid', 'assetid', 'assetrnr']).tolist()
else:
    sortedassetlist = splitassetlist
# ----------------------------------------------------------------------------------------------
rnr = 0
allowedproductslist = ""
assetlist = []
for s in sortedassetlist:
    s1 = str(s[1]) if sortuseridbynumber else s[1].decode('latin1')
    s2 = str(s[2]) if sortassetidbynumber else s[2].decode('latin1')
    kuid = "<"+s[0].decode('latin1')+":"+s1+":"+s2
    if len(s[0])==5: kuid += ":"+str(s[3])
    kuid += ">"
    assetlist.append([kuid,str(s[4]),s[5].decode('latin1')])
    allowedproductslist += cr3indent+str(rnr)+indent+indent+kuid
    rnr += 1
# ----------------------------------------------------------------------------------------------
rnr = 0
file = open(filepath+filename_qcl, "w")
sys.stdout = file    # Set standard stdout to file
for s in assetlist:
    rnr += 1
    text = indent + queuebasename + str(rnr) + cr1indent + "{" + cr2indent
    text += tagnamesize + s[1] + cr2indent
    text += tagnameprod + s[0] + cr2indent
    text += tagnameicnt + cr2indent
    text += allprod + cr2indent + "{"
    if withkuidlist: text += allowedproductslist
    text += cr2indent + "}"
    text += cr1indent + "}" + cr
    print(text)
file.close()
sys.stdout = sys.__stdout__    # Reset to standard stdout
# ----------------------------------------------------------------------------------------------
rnr = 0
file = open(filepath+filename_sal, "w")
sys.stdout = file    # Set standard stdout to file
for s in assetlist:
    print(s[0] + delimiter_sal + " " + s[1] + \
    ("" if s[0]==s[2] else (delimiter_sal+" "+s[2] if format in (1,2,4) else "")))
file.close()
sys.stdout = sys.__stdout__    # Reset to standard stdout
# ==============================================================================================
"]
The used testdata textfiles I post in the next post.
 
Last edited:
And here are the testdata I used:
Code:
testdata {
    # ----------------------------------------------------------------------------
    # The delimiter symbol is here '?' but may be setted in the variable.
    # One or more blanks before and after the delimiter possible 
    # List entry format 1: "<kuid...> ? name ? queuesize",
    # List entry format 2: "<kuid...> ? queuesize ? name",
    # List entry format 3: "<kuid...> ? queuesize",
    # List entry format 4: "<kuid...> ? name",    # all with same setted queuesize 
    # List entry format 5: "<kuid...>",           # all with same setted queuesize 
    # -----------------------------------------------------------------------------
    
    # -----------------------------------------------------------------------------
    unsorted_list_format_1 = [ # --------------------------------------------------
    " <kuid2:60238:38800:1> ?  Airport Container Depot ?221",
    " <kuid2:60238:38801:1> ?  Airport Container Dropoff ?211",
    " <kuid2:114219:100293:1> ?  CHN containers unload 40t ?12",
    " <kuid2:60238:39045:1> ?  Container Depot 2 - 20 Foot Containers ?144",
    " <kuid2:117140:10139:1> ?  Container Station Basic ?173",
    " <kuid2:240543:1119:1> ?  Container Station Plain ?20",
    " <kuid2:114219:100868:1> ?  BY containers unload 40t ?18",
    " <kuid2:60238:38524:5> ?  Container Straddle Crane 10 ?127",
    " <kuid:521966:103380> ?  RC Container Straddle Crane 14 - Blue scheme ?198",
    " <kuid:780388:102932> ?  TARG - Estacion de Carga Contenedores ?183",
    " <kuid2:114219:100294:1> ?  CHN containers unload 20t ?251",
    " <kuid:95230:102616> ?  Container Station V2 ?247",
    " <kuid:114219:100576> ?  de unload cont XVG 20t ?72",
    " <kuid2:114219:100565:1> ?  de unload cont XVG 40t ?30",
    " <kuid:242944:100182> ?  SAM P-ZWD 20ft Container Station ?12",
    " <kuid:114219:100566> ?  de unload cont ZDV 40t ?55",
    " <kuid2:439337:100498:3> ?  BI2 Container Expanded ?60",
    " <kuid:114219:1170> ?  de Unloader cont 20t xvg ?73",
    " <kuid:114219:1171> ?  de Unloader cont 40t xvg ?15",
    " <kuid2:105915:100001:1> ?  PL 53ft Containers ?227",
    " <kuid2:517519:40014:1> ?  RI Container Station 20ft ?  27 ",
    " <kuid2:517519:40013:1> ?  RI Container Station 40ft ? 24 ",
    " <kuid:242944:100183> ?  SAM P-ZWD 40ft Container Station ?204",
    " <kuid2:351022:25130:1> ?  WS Containerlager 20 ?134",
    " <kuid2:351022:25131:1> ?  WS Containerlager 40 ?226",
    " <kuid2:439337:105665:1> ?  SAP_BI3_Container_and_Intermodal ?241",
    ] # ---------------------------------------------------------------------------
    # -----------------------------------------------------------------------------
    
    # -----------------------------------------------------------------------------
    unsorted_list_format_2 = [ # --------------------------------------------------
    " <kuid2:60238:38800:1> ?221?  Airport Container Depot ",
    " <kuid2:60238:38801:1> ?211?  Airport Container Dropoff ",
    " <kuid2:114219:100293:1> ?12?  CHN containers unload 40t ",
    " <kuid2:60238:39045:1> ?144?  Container Depot 2 - 20 Foot Containers ",
    " <kuid2:117140:10139:1> ?173?  Container Station Basic ",
    " <kuid2:240543:1119:1> ?20?  Container Station Plain ",
    " <kuid2:114219:100868:1> ?18?  BY containers unload 40t ",
    " <kuid2:60238:38524:5> ?127?  Container Straddle Crane 10 ",
    " <kuid:521966:103380> ?198?  RC Container Straddle Crane 14 - Blue scheme ",
    " <kuid:780388:102932> ?183?  TARG - Estacion de Carga Contenedores ",
    " <kuid2:114219:100294:1> ?251?  CHN containers unload 20t ",
    " <kuid:95230:102616> ?247?  Container Station V2 ",
    " <kuid:114219:100576> ?72?  de unload cont XVG 20t ",
    " <kuid2:114219:100565:1> ?30?  de unload cont XVG 40t ",
    " <kuid:242944:100182> ?12?  SAM P-ZWD 20ft Container Station ",
    " <kuid:114219:100566> ?55?  de unload cont ZDV 40t ",
    " <kuid2:439337:100498:3> ?60?  BI2 Container Expanded ",
    " <kuid:114219:1170> ?73?  de Unloader cont 20t xvg ",
    " <kuid:114219:1171> ?15?  de Unloader cont 40t xvg ",
    " <kuid2:105915:100001:1> ?227?  PL 53ft Containers ",
    " <kuid2:517519:40014:1> ?27?  RI Container Station 20ft ",
    " <kuid2:517519:40013:1> ?24?  RI Container Station 40ft ",
    " <kuid:242944:100183> ?204?  SAM P-ZWD 40ft Container Station ",
    " <kuid2:351022:25130:1> ?134?  WS Containerlager 20 ",
    " <kuid2:351022:25131:1> ?226?  WS Containerlager 40 ",
    " <kuid2:439337:105665:1> ?241?  SAP_BI3_Container_and_Intermodal ",
    ] # ---------------------------------------------------------------------------
    # -----------------------------------------------------------------------------
    
    # -----------------------------------------------------------------------------
    unsorted_list_format_3 = [ # --------------------------------------------------
    " <kuid2:60238:38800:1> ?221",
    " <kuid2:60238:38801:1> ?211",
    " <kuid2:114219:100293:1> ?12",
    " <kuid2:60238:39045:1> ?144",
    " <kuid2:117140:10139:1> ?173",
    " <kuid2:240543:1119:1> ?20",
    " <kuid2:114219:100868:1> ?18",
    " <kuid2:60238:38524:5> ?127",
    " <kuid:521966:103380> ? 198",
    " <kuid:780388:102932> ?183",
    " <kuid2:114219:100294:1> ? 251 ",
    " <kuid:95230:102616> ?247",
    " <kuid:114219:100576> ?72",
    " <kuid2:114219:100565:1> ?  30",
    " <kuid:242944:100182> ?12",
    " <kuid:114219:100566> ?55",
    " <kuid2:439337:100498:3> ?60   ",
    " <kuid:114219:1170> ?73",
    " <kuid:114219:1171> ?15",
    " <kuid2:105915:100001:1> ?227",
    " <kuid2:517519:40014:1> ?27",
    " <kuid2:517519:40013:1> ?24",
    " <kuid:242944:100183> ?204",
    " <kuid2:351022:25130:1> ?134",
    " <kuid2:351022:25131:1> ?226",
    " <kuid2:439337:105665:1> ?241",
    
    ] # ---------------------------------------------------------------------------
    # -----------------------------------------------------------------------------
    
    # -----------------------------------------------------------------------------
    unsorted_list_format_4 = [ # --------------------------------------------------
    " <kuid2:60238:38800:1> ?  Airport Container Depot   ",
    " <kuid2:60238:38801:1> ?  Airport Container Dropoff   ",
    " <kuid2:114219:100293:1> ?  CHN containers unload 40t   ",
    " <kuid2:60238:39045:1> ?  Container Depot 2 - 20 Foot Containers   ",
    " <kuid2:117140:10139:1> ?  Container Station Basic   ",
    " <kuid2:240543:1119:1> ?  Container Station Plain   ",
    " <kuid2:114219:100868:1> ?  BY containers unload 40t   ",
    " <kuid2:60238:38524:5> ?  Container Straddle Crane 10   ",
    " <kuid:521966:103380> ?  RC Container Straddle Crane 14 - Blue scheme   ",
    " <kuid:780388:102932> ?  TARG - Estacion de Carga Contenedores   ",
    " <kuid2:114219:100294:1> ?  CHN containers unload 20t   ",
    " <kuid:95230:102616> ?  Container Station V2   ",
    " <kuid:114219:100576> ?  de unload cont XVG 20t   ",
    " <kuid2:114219:100565:1> ?  de unload cont XVG 40t   ",
    " <kuid:242944:100182> ?  SAM P-ZWD 20ft Container Station   ",
    " <kuid:114219:100566> ?  de unload cont ZDV 40t   ",
    " <kuid2:439337:100498:3> ?  BI2 Container Expanded   ",
    " <kuid:114219:1170> ?  de Unloader cont 20t xvg   ",
    " <kuid:114219:1171> ?  de Unloader cont 40t xvg   ",
    " <kuid2:105915:100001:1> ?  PL 53ft Containers   ",
    " <kuid2:517519:40014:1> ?  RI Container Station 20ft   ",
    " <kuid2:517519:40013:1> ?  RI Container Station 40ft   ",
    " <kuid:242944:100183> ?  SAM P-ZWD 40ft Container Station   ",
    " <kuid2:351022:25130:1> ?  WS Containerlager 20   ",
    " <kuid2:351022:25131:1> ?  WS Containerlager 40   ",
    " <kuid2:439337:105665:1> ?  SAP_BI3_Container_and_Intermodal   ",
    ] # ---------------------------------------------------------------------------
    # -----------------------------------------------------------------------------
    
    # -----------------------------------------------------------------------------
    unsorted_list_format_5 = [ # --------------------------------------------------
    " <kuid2:60238:38800:1>    ",
    " <kuid2:60238:38801:1>    ",
    " <kuid2:114219:100293:1>  ",
    " <kuid2:60238:39045:1>    ",
    " <kuid2:117140:10139:1>   ",
    " <kuid2:240543:1119:1>    ",
    " <kuid2:114219:100868:1>  ",
    " <kuid2:60238:38524:5>    ",
    " <kuid:521966:103380>     ",
    " <kuid:780388:102932>     ",
    " <kuid2:114219:100294:1>  ",
    " <kuid:95230:102616>      ",
    " <kuid:114219:100576>     ",
    " <kuid2:114219:100565:1>  ",
    " <kuid:242944:100182>     ",
    " <kuid:114219:100566>     ",
    " <kuid2:439337:100498:3>  ",
    " <kuid:114219:1170>       ",
    " <kuid:114219:1171>       ",
    " <kuid2:105915:100001:1>  ",
    " <kuid2:517519:40014:1>   ",
    " <kuid2:517519:40013:1>   ",
    " <kuid:242944:100183>     ",
    " <kuid2:351022:25130:1>   ",
    " <kuid2:351022:25131:1>   ",
    " <kuid2:439337:105665:1>  ",
    ] # ---------------------------------------------------------------------------
    # -----------------------------------------------------------------------------
}
"]
 
Interesting. After a quick read, I see several places where I do not understand why you did what you did. A closer study may reveal more.

You import bpy, but never use it.
I do not see any code to read the data from an external file.
The record-parsing code is very wordy.
I see no need for your field separator, as your record formats are simple enough to parse without one.
Why do you mess with stdout instead of just printing to file?
Why do you use numpy to sort with? Python`s native sort code is more than sufficient to handle the job.
There seem to be several unused variables.

Would you like to see my take on your code? We might both learn something by discussing it.
 
You import bpy, but never use it.
Is a relict from blender, may be deleted
I do not see any code to read the data from an external file.
Is copy&past from elsewhere, May be a feature for V3.
The record-parsing code is very wordy.
Do you mean it in the sense of circuitou? May be the code isn't that elegant or nifty, but runs. may be that there are some optimations possible. I'm not a professional at all, only a pensioner ;). And my code was not intended to be professional, only functionaly (a very time saving fact 😇 ).
I see no need for your field separator, as your record formats are simple enough to parse without one.
Yes, it runs with blank seperartor too, but if some has a csv text it is helpful in my eyes.
Why do you mess with stdout instead of just printing to file?
Very good hint (y). I didn't know how to write to files in blender, but it looks like there is no difference.
Why do you use numpy to sort with? Python`s native sort code is more than sufficient to handle the job.
Don't found a solution to sort over multiple columns in array of lists and found some hints in the numpy docs.
There seem to be several unused variables.
Oh, something to look for today.
Would you like to see my take on your code? We might both learn something by discussing it.
Good idea. (y) For me it's important to have it run with Blender, in conjunction with notepad++, but this should not be a constraint.
 
Now here is the Version 3. You may set the parameters in asset_list_config.py and prepare a plain text file. A copy from a CM list runs adhoc.
All files files (unsorted list, QCG config file, py-script and if you wish, the batch file to start tthe script. Of course Python should be installed and in the program path list.
Code:
import sys,os,importlib
# ==============================================================================================
# Creating a queue container list V3
# For https://forums.auran.com/threads/tool-to-create-tables-in-config-file.176963/#post-2009085
# No special license but telling the source
# ==============================================================================================
# Adding folder to searchpath 
# For Python:  files together in same folder as the scripts
# For Blender: files in same folder as blend file
#------------------------------------------------------------------------------#
savepath=sys.path   # save the current sys.path
#------------------------------------------------------------------------------#
scriptfolder = os.path.dirname(__file__)
# -----------------------------------------------------------------------------#
if scriptfolder[-6:]==".blend":            # This a workaround for 
    pos = scriptfolder.rfind("\\")         # running the script 
    scriptfolder = scriptfolder[:pos]      # from Blender scripting workspace
# -----------------------------------------------------------------------------#
if not scriptfolder in sys.path:
    sys.path.append(scriptfolder)   # append script file path to search path
#------------------------------------------------------------------------------#
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++#
# Import module for direct use of variables and methods
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++#
import asset_list_config              # reload module and ...
importlib.reload(asset_list_config)   # ... update/reset after changing values
from asset_list_config import *
#------------------------------------------------------------------------------#
#mod = imp.reload(sys.modules['asset_list_config'])
#vars().update(mod.__dict__)   # ... update/reset after changing values
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++#
#------------------------------------------------------------------------------#
sys.path=savepath   # restore the saved sys.path
# ==============================================================================================
# ### From here don't change any thing #########################################################
# ==============================================================================================
assetlist = []
file = open(scriptfolder+"\\"+filename_ual, "r")
for s in file:
    assetlist.append(s[:-1])
file.close()
# ----------------------------------------------------------------------------------------------
tagnamesize = "size                 "
tagnameprod = "product-kuid         "
tagnameicnt = "inital-count         0"
allprod     = "allowed-products"
# ----------------------------------------------------------------------------------------------
cr  ="""
"""
cr1indent =cr+indent
cr2indent =cr1indent+indent
cr3indent =cr2indent+indent
# ----------------------------------------------------------------------------------------------
maxnamelength    = 1
maxuseridlength  = 1
maxassetidlength = 1
splitassetlist   = []
for s in assetlist:
    f = []
    pos1 = s.find(">")
    pos2 = s.find("<")
    # --- kuid --------------------------
    kuid  = s[pos2+1:pos1].strip()
    parts = kuid.split(":")
    if len(parts[1]) > maxuseridlength: maxuseridlength=len(parts[1])
    if len(parts[2]) > maxuseridlength: maxuseridlength=len(parts[2])
    if sortuseridbynumber:  parts[1] = int(parts[1])
    if sortassetidbynumber: parts[2] = int(parts[2])
    if len(parts) == 3: parts.append("0")
    parts[3]=int(parts[3])
    for i in range(0,len(parts)):
        f.append(parts[i])
    # -----------------------------
    size = queuesize
    pos1 = s.find(delimiter_asl)
    if   format == 1: # List entry format 1: "<kuid...>?name?queuesize",
        pos2 = s.rfind(delimiter_asl)
        f.append(int(s[pos2+1:]))
        f.append(s[pos1+1:pos2].strip())
        l = len(s[pos1+1:pos2].strip())
        if l > maxnamelength: maxnamelength = l
    elif format == 2: # List entry format 2: "<kuid...>?queuesize?name",
        pos2 = s.find(delimiter_asl,pos1+1)
        f.append(int(s[pos1+1:pos2]))
        f.append(s[pos2+1:].strip())
        l = len(s[pos2:].strip())
        if l > maxnamelength: maxnamelength = l
    elif format == 3: # List entry format 3: "<kuid...>?queuesize",
        f.append(int(s[pos1+1:]))
        f.append("")
    elif format == 4: # List entry format 4: "<kuid...>?name", with setted queuesize 
        f.append(size)
        f.append(s[pos1+1:].strip())
        l = len(s[pos1+1:].strip())
        if l > maxnamelength: maxnamelength = l
    elif format== 5: # List entry format 5: "<kuid...>", with setted queuesize
        f.append(size)
        f.append("")
    splitassetlist.append(f)
# ----------------------------------------------------------------------------------------------
if sortkuids:
    sortedassetlist = sorted(splitassetlist, key=lambda x:(x[1], x[2], x[3]))
else:
    sortedassetlist = splitassetlist
# ----------------------------------------------------------------------------------------------
rnr = 0
allowedproductslist = ""
assetlist = []
for s in sortedassetlist:
    s1 = str(s[1]) if sortuseridbynumber else s[1]
    s2 = str(s[2]) if sortassetidbynumber else s[2]
    kuid = "<"+s[0]+":"+s1+":"+s2
    if len(s[0])==5: kuid += ":"+str(s[3])
    kuid += ">"
    assetlist.append([kuid,str(s[4]),s[5]])
    allowedproductslist += cr3indent+str(rnr)+indent+indent+kuid
    rnr += 1
# ----------------------------------------------------------------------------------------------
rnr = 0
file = open(scriptfolder+"\\"+filename_qcl, "w")
sys.stdout = file    # Set standard stdout to file
for s in assetlist:
    rnr += 1
    text = indent + queuebasename + str(rnr) + cr1indent + "{" + cr2indent
    text += tagnamesize + s[1] + cr2indent
    text += tagnameprod + s[0] + cr2indent
    text += tagnameicnt + cr2indent
    text += allprod + cr2indent + "{"
    if withkuidlist: text += allowedproductslist
    text += cr2indent + "}"
    text += cr1indent + "}" + cr
    print(text)
file.close()
sys.stdout = sys.__stdout__    # Reset to standard stdout
# ----------------------------------------------------------------------------------------------
rnr = 0
file = open(scriptfolder+"\\"+filename_sal, "w")
sys.stdout = file    # Set standard stdout to file
for s in assetlist:
    print(s[0] + delimiter_sal + " " + s[1] + \
    ("" if s[0]==s[2] else (delimiter_sal+" "+s[2] if format in (1,2,4) else "")))
sys.stdout = sys.__stdout__    # Reset to standard stdout
file.close()
# ==============================================================================================
Code:
# ==============================================================================================
filename_ual  = "asset_list_unsorted.txt"         # for unsorted_asset_list.txt file to read
filename_qcl  = "queue_container_list.txt"        # for queue_container_list.txt file to write
filename_sal  = "asset_list_sorted.txt"           # for sorted_asset_list.txt file to write
queuebasename = "queue"        # Used for queue tag name followed by a running number
queuesize     = 256            # Standard queue count value format 4 + 5
# ----------------------------------------------------------------------------------------------
# The delimiter symbol is here '?' but may be setted in the variable for your needs.
# One or more blanks before and after the delimiter possible 
# List entry format 1: "<kuid...> ? name ? queuesize",
# List entry format 2: "<kuid...> ? queuesize ? name",
# List entry format 3: "<kuid...> ? queuesize",
# List entry format 4: "<kuid...> ? name",    # all with same setted standard queuesize 
# List entry format 5: "<kuid...>",           # all with same setted standard queuesize 
# ----------------------------------------------------------------------------------------------
delimiter_asl = " "      # Delimiter character between the string parts for input file
delimiter_sal = ","      # Delimiter character between the string parts for outpu file
format        = 4        # Format of the string we use as source data
withkuidlist  = True     # The sub container "allowed-products" contains the kuids? (False/True)
indent        = "    "   # The indent for the tags and sub containers
# ----------------------------------------------------------------------------------------------
sortkuids            = True   # Shell the value be sorted? (True/False)
sortuseridbynumber   = False  # Shell the userid be sorted as number? (True/False)
#sortuseridascending  = True   # Sort ascending? (not implemented yet)
sortassetidbynumber  = False   # Shell the assetid be sorted as number? (True/False)
#sortasseridascending = True   # Sort ascending? (not implemented yet)
# ==============================================================================================
Code:
@echo off
python ./TrainzQueueContainerGenerator_V3.py
pause
 
Code:
<kuid2:60238:38800:1> Airport Container Depot
<kuid2:60238:38801:1> Airport Container Dropoff
<kuid2:114219:100293:1> CHN containers unload 40t
<kuid2:60238:39045:1> Container Depot 2 - 20 Foot Containers
<kuid2:117140:10139:1> Container Station Basic
<kuid2:240543:1119:1> Container Station Plain
<kuid2:114219:100868:1> BY containers unload 40t
<kuid2:60238:38524:5> Container Straddle Crane 10
<kuid:521966:103380> RC Container Straddle Crane 14 - Blue scheme
<kuid:780388:102932> TARG - Estacion de Carga Contenedores
<kuid2:114219:100294:1> CHN containers unload 20t
<kuid:95230:102616> Container Station V2
<kuid:114219:100576> de unload cont XVG 20t
<kuid2:114219:100565:1> de unload cont XVG 40t
<kuid:242944:100182> SAM P-ZWD 20ft Container Station
<kuid:114219:100566> de unload cont ZDV 40t
<kuid2:439337:100498:3> BI2 Container Expanded
<kuid:114219:1170> de Unloader cont 20t xvg
<kuid:114219:1171> de Unloader cont 40t xvg
<kuid2:105915:100001:1> PL 53ft Containers
<kuid2:517519:40014:1> RI Container Station 20ft
<kuid2:517519:40013:1> RI Container Station 40ft
<kuid:242944:100183> SAM P-ZWD 40ft Container Station
<kuid2:351022:25130:1> WS Containerlager 20
<kuid2:351022:25131:1> WS Containerlager 40
<kuid2:439337:105665:1> SAP_BI3_Container_and_Intermodal

The link for downloading a ZIP-file with the four files: Download-Link

Hint: How to download ...

How-to-download-a-file-from-a-Google-Drive-sharing-link..jpg
 
Last edited:
@CobraLAD The following script will not in any way disparage your accomplishment. Scripting in Excel is a world that I never worked with. So hats off to you. 👍

Some weeks ago I wrote for my own purpose a python script with a similar destination. And because not all people like macros in MS Office or LibreOffice I decided to show the script here. I adapted it to @CobraLAD's destination in this thread. In my eyes the script is self explanatory with the additional comments. Set the variables to your need or adapt the script to your need.
There is no special license to it, but telling the source of the original would be nice.
The script works in blender python scripting workspace as well as in other Python installations.
Code:
import sys,os
# ==============================================================================================
# For https://forums.auran.com/threads/tool-to-create-tables-in-config-file.176963 by ek.skirl
# ==============================================================================================
filepath      = os.path.expanduser("~/Desktop/")  # Here the file is stored at the desktop
filename      = "queue_container_list.txt"  # with the name queue_container_list.txt
queuebasename = "queue"   # Used for queue tag name followed by a running number
# ----------------------------------------------------------------------------------------------
# The delimiter symbol is here '?' but may be setted in the variable.
# One or more blanks before and after the delimiter possible
# List entry format 1: "<kuid...>?name?queuesize",
# List entry format 2: "<kuid...>?queuesize?name",
# List entry format 3: "<kuid...>?queuesize",
# List entry format 4: "<kuid...>?name", with setted queuesize
# List entry format 5: "<kuid...>", with setted queuesize
# ----------------------------------------------------------------------------------------------
queuesize    = 256
delimiter    = " "
format       = 4
withkuidlist = True   # The sub container "allowed-products" contains the kuids? (False/True)
# ----------------------------------------------------------------------------------------------
assetlist = [ # --------------------------------------------------------------------------------
"<kuid2:215489:110001:1> aCTS PRODUCT CATEGORY Container 10ft sc",
"<kuid:215489:100065> New Route",
"<kuid2:215489:110002:2> aCTS PRODUCT CATEGORY Container 10ft hc",
"<kuid:215489:100066> New Route - Default",
"<kuid:215489:100054> REGISTERING ROUTE",
"<kuid:215489:100055> REGISTERING SESSION - Empty",
"<kuid2:215489:1100200:1> aCTS CONTAINER Texture Group V1",
] # --------------------------------------------------------------------------------------------
# ----------------------------------------------------------------------------------------------
tagnamesize = "size                 "
tagnameprod = "product-kuid         "
tagnameicnt = "inital-count         0"
allprod     = "allowed-products"
# ----------------------------------------------------------------------------------------------
indent = "    "
# ==============================================================================================
cr  ="""
"""
cr1indent =cr+indent
cr2indent =cr1indent+indent
cr3indent =cr2indent+indent
# ----------------------------------------------------------------------------------------------
rnr = 0
allowedproductslist = ""
for s in assetlist:
    pos1 = s.find(">")
    allowedproductslist += cr3indent+str(rnr)+indent+indent+s[:pos1+1].strip()
    rnr += 1
rnr = 0
file = open(filepath+filename, "w")
sys.stdout = file    # Set standard stdout to file
for s in assetlist:
    pos1 = s.find(">")
    trainzkuid = s[:pos1+1].strip()
    size = queuesize
    if   format == 1: # List entry format 1: "<kuid...>?name?queuesize",
        pos2 = s.rfind(" ")
        size = int(s[pos2:])
        # name = s[pos1+1:pos2].strip()
    elif format == 2: # List entry format 2: "<kuid...>?queuesize?name",
        pos2 = s.find(" ",pos1)
        size = int(s[pos2:])
        # name = s[pos2:].strip()
    elif format == 3: # List entry format 3: "<kuid...>?queuesize",
        size = int(s[pos1:])
    elif format == 4: # List entry format 4: "<kuid...>?name", with setted queuesize
        # name = s[pos1+1:].strip()
        xxx = 123 # Dummy instruction for syntax purpose only
    rnr += 1
    text = indent+queuebasename+str(rnr)+cr1indent+"{"+cr2indent
    text += tagnamesize+str(size)+cr2indent
    text += tagnameprod+trainzkuid+cr2indent
    text += tagnameicnt+cr2indent
    text += allprod+cr2indent+"{"
    if withkuidlist: text += allowedproductslist
    text += cr2indent+"}"
    text += cr1indent+"}"+cr
    print(text)
file.close()
sys.stdout = sys.__stdout__    # Reset to standard stdout
# ==============================================================================================
The resulting textfile looks like follows
Code:
    queue1
    {
        size                 256
        product-kuid         <kuid2:215489:110001:1>
        inital-count         0
        allowed-products
        {
            0        <kuid2:215489:110001:1>
            1        <kuid:215489:100065>
            2        <kuid2:215489:110002:2>
            3        <kuid:215489:100066>
            4        <kuid:215489:100054>
            5        <kuid:215489:100055>
            6        <kuid2:215489:1100200:1>
        }
    }

    queue2
    {
        size                 256
        product-kuid         <kuid:215489:100065>
        inital-count         0
        allowed-products
        {
            0        <kuid2:215489:110001:1>
            1        <kuid:215489:100065>
            2        <kuid2:215489:110002:2>
            3        <kuid:215489:100066>
            4        <kuid:215489:100054>
            5        <kuid:215489:100055>
            6        <kuid2:215489:1100200:1>
        }
    }

    queue3
    {
        size                 256
        product-kuid         <kuid2:215489:110002:2>
        inital-count         0
        allowed-products
        {
            0        <kuid2:215489:110001:1>
            1        <kuid:215489:100065>
            2        <kuid2:215489:110002:2>
            3        <kuid:215489:100066>
            4        <kuid:215489:100054>
            5        <kuid:215489:100055>
            6        <kuid2:215489:1100200:1>
        }
    }

    queue4
    {
        size                 256
        product-kuid         <kuid:215489:100066>
        inital-count         0
        allowed-products
        {
            0        <kuid2:215489:110001:1>
            1        <kuid:215489:100065>
            2        <kuid2:215489:110002:2>
            3        <kuid:215489:100066>
            4        <kuid:215489:100054>
            5        <kuid:215489:100055>
            6        <kuid2:215489:1100200:1>
        }
    }

    queue5
    {
        size                 256
        product-kuid         <kuid:215489:100054>
        inital-count         0
        allowed-products
        {
            0        <kuid2:215489:110001:1>
            1        <kuid:215489:100065>
            2        <kuid2:215489:110002:2>
            3        <kuid:215489:100066>
            4        <kuid:215489:100054>
            5        <kuid:215489:100055>
            6        <kuid2:215489:1100200:1>
        }
    }

    queue6
    {
        size                 256
        product-kuid         <kuid:215489:100055>
        inital-count         0
        allowed-products
        {
            0        <kuid2:215489:110001:1>
            1        <kuid:215489:100065>
            2        <kuid2:215489:110002:2>
            3        <kuid:215489:100066>
            4        <kuid:215489:100054>
            5        <kuid:215489:100055>
            6        <kuid2:215489:1100200:1>
        }
    }

    queue7
    {
        size                 256
        product-kuid         <kuid2:215489:1100200:1>
        inital-count         0
        allowed-products
        {
            0        <kuid2:215489:110001:1>
            1        <kuid:215489:100065>
            2        <kuid2:215489:110002:2>
            3        <kuid:215489:100066>
            4        <kuid:215489:100054>
            5        <kuid:215489:100055>
            6        <kuid2:215489:1100200:1>
        }
    }
"]
Of course I try to answer any question to it.
Hello ek.skirl, your code is unique. Unfortunately, I do not know python and how it works. The fact that no license is required is a bonus, good work
 
@CobraLAD What a great and of course many more handy solution this is. The posibility of using marked entries is a 5-*-luxury. Great work. (y) 🌟🌟🌟🌟🌟(y)

And looking your vids lets grow in me the wish to know how such things work in scripting macros and how the things look and work behind the scenes.
 
Last edited:
@CobraLAD What a great and of course many more handy solution this is. The posibility of using marked entries is a 5-*-luxury. Great work. (y) 🌟🌟🌟🌟🌟(y)

And looking your vids lets grow in me the wish to know how such things work in scripting macros and how the things look and work behind the scenes.
Thank you for the nice message, really appreciate it
 
AssetX can create and repair (update) mesh-tables and kuid-tables at least for assets up to and including TANE. It can’t do mesh-tables in later editions using FBX and trainzmesh, but can still do kuid-tables.

We definitely need a config-writing and editing tool for current Trainz editions. If one is to be developed, it will probably be from a user. N3V don’t seem to be interested in providing such tools.
The last few days I gave this a lot of thought. Currently I am concentrating on the tool to add commodities to a train car and bulk industries quicker and easier.
I had a look (for the first time) at the asset creating tool on TS12
Creating a configure file from scratch is not impossible with excel and macros.

To create from scratch, you will need 3 things
1. A database (very possible with Excel)
2. A userform to add to your database (I created a music database in excel for all my music (my second hobby), adding a CD with album art, copying, removing, checking the album art, checking the database with the actual files for errors, etc.)
3. The creator. Creating something similar to TS12 is possible (in excel) You will be able to choose all the options and press a button to generate.

For example, let’s take a train car with attachment points. Selecting the train car from a list and then show you all the att points with a selected box to choose the att points for a specific que, very much possible.

Also a browse button to choose your im files and copy them to your folder. Also creating sub folders and adding the path to the mess table. This is all possible.

Will need help to understand the mesh tables. I’ve seen some short ones and also some long ones and then there is smoke tables also.

My point is, if there is a line in the config file, Excel can generate it. This will have to be team effort.
 
Did you see the list of tags and containers in the wiki? (https://online.ts2009.com/mediaWiki/index.php/Index_of_Tags_&_Containers) In the third column you may see the parents of a tag- or containername.
I for myself needed a little bit to mind the different uses of the word container in the different contexts. I realised three contexts: First of course the Standard shipping containers (10ft, 20ft, 30ft(?), 40ft, 45ft, 53ft). Second the product categors container. The first containers are part of this plus boxes, sacks and so on. And the third was the sub soup container in the config.txt files.
And did you see the overview about container tags? (https://online.ts2009.com/mediaWiki/index.php/Category:Config_Container).
I think you did. But it should not be kept quite about.
 
Did you see the list of tags and containers in the wiki? (https://online.ts2009.com/mediaWiki/index.php/Index_of_Tags_&_Containers) In the third column you may see the parents of a tag- or containername.
I for myself needed a little bit to mind the different uses of the word container in the different contexts. I realised three contexts: First of course the Standard shipping containers (10ft, 20ft, 30ft(?), 40ft, 45ft, 53ft). Second the product categors container. The first containers are part of this plus boxes, sacks and so on. And the third was the sub soup container in the config.txt files.
And did you see the overview about container tags? (https://online.ts2009.com/mediaWiki/index.php/Category:Config_Container).
I think you did. But it should not be kept quite about.
Sorry for the late reply, my full-time job sometimes requires me to be on site for a few days and then I have to sleep over.

Yes I saw that, and it is a lot of info. I am starting to understand how the config file works and there a sub under a sub. That can be controlled the same as you use indent in excel. Let me work on a basic setup on moving a section left and right as needed.

For example this part has 3 sub levels
Code:
queues
{
  prod0_in_q
  {
    size                                256
    initial-count                       0
    product-kuid                        <kuid:-3:10014>
    
    allowed-products
    {
      0                                 <kuid:-3:10014>
    }
  }

I think that I can do the programming and with help from the more advanced members on how the different config files are done, that together as team, we can create a config file generator.
 
Hi All

Full release (except a proper help. I will some time create a pdf file with step-by-step instructions) All the videos to date, should give you a good idea how the tool work.
tool_cobralad_v2
I am including another video to show how the tool work.
BI_Industry

Enjoy!!
 
Hi Leendert,

I've just tried your tool in Excel : a listing of 4100 assets, with kuid numbers and descriptions, sorted beautifully in ... one second :love: !!!
I'm baffled ! One hour of manual sorting avoided : Thank you !!!

I usually work with Libre Office rather than Microsoft Excel : when loading your tool, the process stops and reports this error :
Trainz-Config-Tool-Error-in-Libre-Office.jpg


Hope this can be usefull to track the culprit ...

Cheers,

Philippe
 
Hi Leendert,

I've just tried your tool in Excel : a listing of 4100 assets, with kuid numbers and descriptions, sorted beautifully in ... one second :love: !!!
I'm baffled ! One hour of manual sorting avoided : Thank you !!!

I usually work with Libre Office rather than Microsoft Excel : when loading your tool, the process stops and reports this error :
Trainz-Config-Tool-Error-in-Libre-Office.jpg


Hope this can be usefull to track the culprit ...

Cheers,

Philippe
That is settings to remember the check box value and is stored in registry, I am not sure it Libre Office will save or read from the same registry line as MS Office. If the tool is used for the first time, it saves the default values of all check boxes, it looks like Libre office don't do that. It is trying to read the settings and cannot find it.
 
Back
Top