• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

Use name tag for GUID

Horst18519

Moderator
Resource contributor
Messages
2,385
Country
germany
I wonder if this is already possible, but I couldn't find out if or how:

Would it be possible to use the name or description tag of a kml or shp file for GUID creation. If I work with sets of objects, I usually give them an almost identical GUID that only differs in the last ciphers. For example:

12345678-1234-1234-1234-00aa00000f01
12345678-1234-1234-1234-00aa00000f02
12345678-1234-1234-1234-00aa00000f03
...

If scenproc could read the name (or even better description) tag and use the number it finds there for the GUID, that would be awesome and save me a lot of time.

I realize this might be tricky as usually a name or redctiption is string, not integer. Not sure if it's possible to convert string to integer and ignore all non-integer data in that field.

If that's too tricky to implement, Arno, would it be possible to have a kml export similar to the xml export, where every placemark has its own line, and the exporter makes sure all those lines are aligned, so if you want to copy a certain value from the whole set of objects, you can simply use the vertical marking? That way, one could do the above manually with only a few clicks.
 
Last edited:
Hi,

In which step are you using these GUID? In the step to make XML library objects?

I am not sure if I understand what you mean with linking the GUID to a SHP or KML file, would it not be linked to an object library instead?
 
Sorry for being a bit imprecise.
I load a kml or shp file which includes a batch of maybe hundreds of objects, all with unique name and description tags. In my case, the names are for example "antenna 01" or "antenna 07" or "antenna 63". Now I'd like to create a placement xml file that uses these numbers/names for the GUID, as I have a library of models with these GUIDS:

12345678-1234-1234-1234-00aa00000f01
...
12345678-1234-1234-1234-00aa00000f07
...
12345678-1234-1234-1234-00aa00000f63
Scenproc would have to use the number from the name or description tag and replace certain ciphers. I think currently it's not possible to use variables in the GUIDs, or is it?
 
In some steps you can get the guid from an attribute. I would have to check if it is the xml or agn steps.

But do you mean that the name attribute should match the name in the object library of the object?
 
No. Use the (number part of the) name or description and put it at the end of the GUID:

object name = antenna 01 -> GUID 12345678-1234-1234-1234-00aa00000f01
object name = antenna 17 -> GUID 12345678-1234-1234-1234-00aa00000f17
object name = antenna 63 -> GUID 12345678-1234-1234-1234-00aa00000f63
 
Humm, that would require very specific parsing. Would maybe be more logical to have a separate attribute for the guid.
 
In the end, all I would want is a kml and/or xml export* that includes the original name.
(* where every object fills a single line of the exported file, like in the xml export now)
 
Hi Thorsten,

I'm afraid I'm fully lost now. I had the impression you wanted to get the guid from some attribute, but now it's about exporting the name.

Maybe we should start from scratch. What's the workflow you try to achieve and which bit is missing in scenproc now?
 
Sorry for the confusion.

I have a kml file containing a batch of objects (in the name or description field):

Code:
antenna 01
antenna 17
antenna 33
antenna 04
antenna 01
antenna 11
antenna 21
antenna 21

I would like scenproc to output an xml that uses the numbers from these objects for GUID creation, so that the batch of placements has these GUIDs:

Code:
12345678-1234-1234-1234-00aa0000f001
12345678-1234-1234-1234-00aa0000f017
12345678-1234-1234-1234-00aa0000f033
12345678-1234-1234-1234-00aa0000f004
12345678-1234-1234-1234-00aa0000f001
12345678-1234-1234-1234-00aa0000f011
12345678-1234-1234-1234-00aa0000f021
12345678-1234-1234-1234-00aa0000f021
 
I could do that manually, but the kml output of scenproc is like the old xml output, where every tag has a new line:

Code:
  <Placemark>
    <ExtendedData><SchemaData schemaUrl="#_lighthouses_v0a">
        <SimpleData name="BGLOBJTYPE">LIBRARYOBJECT</SimpleData>
        <SimpleData name="GUID">12345678-1234-1234-0001-4e2b91440132</SimpleData>
        <SimpleData name="HEADING">159.99938965</SimpleData>
        <SimpleData name="SCALE">1.00000000</SimpleData>
        <SimpleData name="ALT">0.00000000</SimpleData>
        <SimpleData name="ALTISAGL">True</SimpleData>
    </SchemaData></ExtendedData>
      <Point><coordinates>6.99509918689728,53.6749868094921</coordinates></Point>
  </Placemark>

If the kml output would look like this...

Code:
<Placemark><Point><coordinates>10.950991862,53.123926809</coordinates></Point></Placemark>
<Placemark><Point><coordinates>6.2946991848,53.456983509</coordinates></Point></Placemark>
<Placemark><Point><coordinates>5.1920391768,53.789986869</coordinates></Point></Placemark>
<Placemark><Point><coordinates>6.7969527868,53.674986807</coordinates></Point></Placemark>

(strip unnecessary data and put every placement in a single line, making sure all coordinates have the same length)
...that would already help me a lot.
 
The entire purpose of the GUID is to create a reliably unique identifier -- which operates across multiple systems, areas of interest, domains throughout the creative world. If authors were to begin circumventing this system to create the GUID by encoding object information, this would impact the purpose of using a GUID. We might expect the chance that someone might even encode the entire GUID from the item's properties. An author might not ever see any effect. But, they might also cause a conflict between objects at some unknown time in the future and diagnosing the problem would likely be difficult.
This is a clever idea. But if it for use in a project to be shared with the community, it is also a poor idea.
 
I appreciate your concern, but the only issue might be a duplicate GUID, which can easily be avoided.

EDIT: Just to avoid misunderstandings: the word "antenna" does NOT have to be included in the GUID, just the numbers (2 or 3 digits).
 
Hi Thorsten,

So you want to change the guid in the kml code. This kml seems to be made from importing a bgl file.

Did you consider to just make a step in scenproc that selects the objects with the old guid and then makes a new placement with the new guid?
 
Back
Top