• 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.

FSXA Problem with creating XML library from point objects

Messages
217
Country
azerbaijan
Thanks to Arno's ingenious creativity, I found myself making my first steps in autogen development with QGIS and scenProc. So, please bear with me until I have some progress... :)

I'm trying to place 101 places of worship (point objects) scattered around my home country using this simple code:

2d40872ee89bb0329e6ea5465eb1de5f.jpg


The fclass values in SHP are different as below:
  • christian
  • christian-orthodox
  • jewish
  • muslim
  • muslim-shia
What I find strange is scenProc creates the XML objects but doesn't insert the autogen into the prescribed texture folder. So, my first question is why does this happen?

Also, is it possible to process all fclass values in a single step instead of creating autogen for each place of worship, as shown above?

Thanks!
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,891
Country
netherlands
Hi,

If you want to create autogen you need to use CreateAGNLibObject. The command you use now is for BGL placed objects.

If you want to have different objects for the classes you need to use multiple lines. Else you could use fclass="*" to process them all.
 
Messages
217
Country
azerbaijan
Thanks, Arno! The second question is clear - fclass="*" works and scneProc derives all features from the source file. So far so good...
Not sure about the first question though. Indeed, it seems I don't need to place these point objects inside AGN grids. I only need to have them inside a single BGL file, sort of a library of places of worship. Is it possible to achieve this with scenProc?
I've played with different grid sizes (SplitGrid) to no avail yet...

So, I'll try with this code instead:
Code:
# Azerbaijan Places of Worship Autogen
ImportOGR|C:\Users\VNA\Desktop\azerbaijan-latest-free.shp\gis.osm_pofw_free_1.shp|*|*|NOREPROJ
#
CreateXMLLibObj|fclass="*"|{034f8334-427e-fede-b159-25a056dafa40};{e2b7cd38-442d-1e03-ebf1-2d986787b9cd}|HDG|0|0
#
ExportBGL|FSX|pows|C:\Users\VNA\Desktop\Baku|KEEPXML

I do RTFM but am not sure if I follow your point there. Especially the 'filter' explanations remain vague to me when coupled with the sample code provided. :( I better dive into the forum for some more examples/tutorials.
 
Last edited:

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,891
Country
netherlands
Using ExportBGL will work as well if you need bgl output.
 
Messages
217
Country
azerbaijan
Ok, after some trial and error this code worked. I've assigned each fclass a different library object plus added NOAUTOGENSUPPRESSION option (otherwise the scenery is not visible in FSX):
Code:
# Azerbaijan Places of Worship Autogen
ImportOGR|C:\Users\VNA\Desktop\azerbaijan-latest-free.shp\gis.osm_pofw_free_1.shp|*|*|NOREPROJ
#
CreateXMLLibObj|fclass="christian"|ac02d7fb406169be440c41afffe9fe35|HDG|0|0|NOAUTOGENSUPPRESSION
CreateXMLLibObj|fclass="muslim"|034f8334427efedeb15925a056dafa40|HDG|0|0|NOAUTOGENSUPPRESSION
#
ExportBGL|FSX|pow|C:\Users\VNA\Desktop|KEEPXML

Now for the next stage, I wonder:

1. can I combine the above two CreateXMLLibObj lines into a single one but still get the same result?
2. do OSM or SHP files contain any heading data to work with? I can't confirm this with QGIS file analysis nor Google search so far...

Thanks!
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,891
Country
netherlands
Hi,

If you want different objects to be placed you'll need different lines.

OSM contains no heading for point features. But there is a step to derive the heading from nearby road data.
 
Messages
217
Country
azerbaijan
Thanks, Arno! :wizard:

I assume you mean this. When translated, this slightly modified code should mean (at least for me) that any type of point object found in the first SHP file is assigned the heading of any type of road object found in the second SHP file. Please correct me if I'm wrong:

Code:
# Azerbaijan Places of Worship (PoW) BGL
# GUIDs of library objects, not classes!

ImportOGR|F:\MY.PROJECTS\Azerbaijan_X\source_files\SHP\gis.osm_pofw_free_1.shp|*|*|NOREPROJ
ImportOGR|F:\MY.PROJECTS\Azerbaijan_X\source_files\SHP\gis.osm_roads_free_1.shp|*|*|NOREPROJ

# Assign road headings to point objects
HeadingFromNearestLine|FROMFILE="gis.osm_pofw_free_1.shp" And fclass="*"|FROMFILE="gis.osm_roads_free_1.shp" And fclass="*"|HDG

# Individual object GUID for each fclass
CreateXMLLibObj|fclass="christian"|16cd9273b35945c0842d635c95d9127e|HDG|0|0|NOAUTOGENSUPPRESSION
CreateXMLLibObj|fclass="christian_orthodox"|ca2a32c4aa01401d989407db7d844236|HDG|0|0|NOAUTOGENSUPPRESSION
CreateXMLLibObj|fclass="jewish"|c2d9acaa4a55b2c5fa9b80982b3a5a8d|HDG|0|0|NOAUTOGENSUPPRESSION
CreateXMLLibObj|fclass="muslim"|034f8334427efedeb15925a056dafa40|HDG|0|0|NOAUTOGENSUPPRESSION
CreateXMLLibObj|fclass="muslim_shia"|e2b7cd38442d1e03ebf12d986787b9cd|HDG|0|0|NOAUTOGENSUPPRESSION

#
ExportBGL|FSX|pow|F:\MY.PROJECTS\Azerbaijan_X\BGL|KEEPXML

The code works OK but the funny thing is the objects with the first two GUIDs (for "christian" and "christian_orthodox") do not show up in FSXA although for test purposes I used only default FSXA objects.
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,891
Country
netherlands
Hi,

This script looks OK. You can drop teh fclass="*" in the HeadingFromNearestLine step, as the FROMFILE attribute will already return all objects in that file.

Not sure about the GUIDs, if you check the event log after running the script do you see that objects are made for these GUIDs?
 
Messages
217
Country
azerbaijan
Yes, as you can see below, scenProc creates the required objects, which I can also confirm from the contents of XML file. In fact, I took the GUIDs from default.xml and AFAIU all these objects are part of autogen.bgl.
I've changed the first two GUIDs to new ones, but have still the same result. :(
Code:
# Azerbaijan Places of Worship (PoW) BGL
# GUIDs of library objects, not classes!

ImportOGR|F:\MY.PROJECTS\Azerbaijan_X\source_files\SHP\gis.osm_pofw_free_1.shp|*|*|NOREPROJ
ImportOGR|F:\MY.PROJECTS\Azerbaijan_X\source_files\SHP\gis.osm_roads_free_1.shp|*|*|NOREPROJ

# Assign road headings to point objects
HeadingFromNearestLine|FROMFILE="gis.osm_pofw_free_1.shp"|FROMFILE="gis.osm_roads_free_1.shp" And fclass="*"|HDG

# Individual library object GUID for each fclass
CreateXMLLibObj|fclass="christian"|88a9e0a9428406b169ee8b92aa14985c|HDG|0|0|NOAUTOGENSUPPRESSION
CreateXMLLibObj|fclass="christian_orthodox"|e4a52a7a4ca4ac7eb9cf9a84255f5ee8|HDG|0|0|NOAUTOGENSUPPRESSION
CreateXMLLibObj|fclass="jewish"|c2d9acaa4a55b2c5fa9b80982b3a5a8d|HDG|0|0|NOAUTOGENSUPPRESSION
CreateXMLLibObj|fclass="muslim"|034f8334427efedeb15925a056dafa40|HDG|0|0|NOAUTOGENSUPPRESSION
CreateXMLLibObj|fclass="muslim_shia"|e2b7cd38442d1e03ebf12d986787b9cd|HDG|0|0|NOAUTOGENSUPPRESSION

#
ExportBGL|FSX|pow|F:\MY.PROJECTS\Azerbaijan_X\BGL|KEEPXML

capture_06232017_175644.jpg
 
Last edited:

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,891
Country
netherlands
You might want to try to use a GUID that works from the ones below and see if they then appear. If that's the case there is a probleem with the object you selected. If they don't appear something is suppressing the objects, for example an exclude.
 
Messages
578
Country
france
hey @arno i tried to place my own light model along roads i did that once and it has worked but i deleted the script by mistake and i need to place other lights along other type of roads so those are the steps i did :
1) removed all the types of roads that i don't need from the shp file
2) made this script :
index.jpg

and as you you can see there is those errors there and no BGL in the folder just 4 xml files
but in that time that it has worked i got many BGLs
PLZ help :( thnx in advance
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,891
Country
netherlands
Hi,

The problem is that scenProc can't call bglcomp on your system, it needs elevation (which means administrator rights).

In which folder is your scenProc installed? And where is the SDK location?
 
Messages
578
Country
france
sdk in default location and scenproc in c\msfs\fs designtool\mcx\scenproc lastest devlopment release x64
 
Top