Page 1 of 1

Comment line in the .geopcdx file

Unread postPosted: Tue Mar 26, 2024 10:11 am
by QcRail
Does anyone know if it is possible to add a comment line (text) in and or anywhere in an existing compiled ,geopcdx file ? My reference being the one available in the .bin file, such as :
<Name d:type="cDeltaString">[QcR] This is my ...., enjoy it!</Name>

Moreover, any and all programming software integrates this function (to my humble knowledge **!!bow!!** ).

Re: Comment line in the .geopcdx file

Unread postPosted: Wed Mar 27, 2024 6:35 am
by Chacal
If there's no specific comment tag, you can try inventing one and see how the game reacts.
It should just ignore it, but it could terminate or even crash.

Re: Comment line in the .geopcdx file

Unread postPosted: Wed Mar 27, 2024 7:56 am
by QcRail
Chacal wrote:If there's no specific comment tag, you can try inventing one and see how the game reacts.


Thanks Chacal, your first word : « if » is the key word I’m looking for … ???

Re: Comment line in the .geopcdx file

Unread postPosted: Wed Mar 27, 2024 7:16 pm
by Chacal
geopcdx files use XML syntax.
Try the standard XML comments starting with <!-- and ending with -->
Example:
Code: Select all
<detail>
    <band height="20">
    <!--
      Hello,
         I am a multi-line XML comment
         <staticText>
            <reportElement x="180" y="0" width="200" height="20"/>
            <text><![CDATA[Hello World!]]></text>
          </staticText>
      -->
     </band>
</detail>

Re: Comment line in the .geopcdx file

Unread postPosted: Wed Mar 27, 2024 8:48 pm
by kris120
When you use the comment tag you should check whether this comment is translated with serz.
So you have to compile your xml to GeoPcDx and back and look again.

Re: Comment line in the .geopcdx file

Unread postPosted: Thu Mar 28, 2024 2:37 pm
by QcRail
kris120 wrote:When you use the comment tag you should check whether this comment is translated with serz.
So you have to compile your xml to GeoPcDx and back and look again.

That goes without saying, thus for newbies use RW_Tools.exe to have an editable text version ...

Chacal wrote:geopcdx files use XML syntax.
Try the standard XML comments starting with <!-- and ending with -->
Example:
Code: Select all
<detail>
    <band height="20">
    <!--
      Hello,
         I am a multi-line XML comment
         <staticText>
            <reportElement x="180" y="0" width="200" height="20"/>
            <text><![CDATA[Hello World!]]></text>
          </staticText>
      -->
     </band>
</detail>


Eureka !!!

Thanks for the XML syntax and there is a second options that one can adapt as shown bellow :
1. At the top of .geopcdx, I inserted ...
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<cHcGeometry xmlns:d="http://www.kuju.com/TnT/2003/Delta" d:version="1.0" d:id="154565688">
   <Credits d:type="cDeltaString">Creation G-TraX, Asset GX_Veh_BoxTruck02, Alteration QcRail, Distribution RWA</Credits>
   <Description d:type="cDeltaString">TEST version (comment lines in GEO file and delivery truck with
out box)</Description>

Note, the d:type="cDeltaString" is required, but you can use any label that you want. !!*ok*!!

2. Anywhere in the file, you can insert any additional comment ...
Code: Select all
   </Material>
   <!-- Two matrix inactives, the 3rd + the 5th --> 
   <Description d:type="cDeltaString">Third and fifth matrix for box are inactive (16th value of matrix = 0)</Description>   
   <SourceLToPTransform>


... and the end result is visible, a truck bare of its box and reefer unit. Now I could add a 20ft container as a replacement to the box !*brav*!

G-Trax Box van.jpg

I shall adopt this simple procedure to my new repaint project, thus giving credits were and when needed.

À Bientot,

Re: Comment line in the .geopcdx file

Unread postPosted: Thu Mar 28, 2024 3:36 pm
by Chacal
Just remember that you can't distribute someone else's geopcdx file without permission, except for a few exceptions.
So you have to give instructions for editing the file.