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

Why can't I import the BGL file, and do I need to set it?

Messages
151
Country
china
is my word:

ImportOGR|C:\Users\zhang\Desktop\SP\SHP\jianzhu.shp|*|*|NOREPROJ
ImportOGR|C:\Users\zhang\Desktop\SP\SHP\lvdi.shp|*|*|NOREPROJ


SplitGrid|AGN|*|FROMFILE="jianzhu.shp"
SplitGrid|AGN|*|FROMFILE="lvdi.shp"

SetAGNBuildingHeight|*|1.0;1.0;1.0;1.0

CreateAGNLibObject|FROMFILE="jianzhu.shp" And FWIDTH>5|{82b3dda9-4572-b942-b2c7-41b062eb87f7};{82b3dda9-4572-b942-b2c7-41b062eb87f7}

ExportAGN|P3D v4|C:\Users\zhang\Desktop\SP\SPC\Texture
 
Hi,

You are using the ExportAGN step at the end of your script, which tells it to create autogen files. So that's what it does.

If you want to place BGL library objects you need to use the CreateXmlLibObject step and use ExportBGL.
 
Hi,

You are using the ExportAGN step at the end of your script, which tells it to create autogen files. So that's what it does.

If you want to place BGL library objects you need to use the CreateXmlLibObject step and use ExportBGL.
thanks !!! i will try
 
Hi,

You are using the ExportAGN step at the end of your script, which tells it to create autogen files. So that's what it does.

If you want to place BGL library objects you need to use the CreateXmlLibObject step and use ExportBGL.
Why do I see a lot of examples that don't use the CreateXmlLibObject?
 
thanks !!! i will try
emm,Can I export the generated model? How do I set it up? Or use the CreateXmlLibObject step and use ExportBGL
Hi,

You are using the ExportAGN step at the end of your script, which tells it to create autogen files. So that's what it does.

If you want to place BGL library objects you need to use the CreateXmlLibObject step and use ExportBGL.
 
Section 5.6 in the manual comes closest to what you want. It placed the objects along a line, but you can place them in other way as well.
 
Section 5.6 in the manual comes closest to what you want. It placed the objects along a line, but you can place them in other way as well.
HI, arno,I'm very sorry, maybe I didn't express myself clearly. We don't seem to mean the same thing. What I mean is that I want to export the generated building model. I just tried a new scene. You can take a look at my code. Which script do I need to export the BGL file of the building model?
my code
ImportOGR|C:\Users\Administrator\Desktop\test\sp\shp\map (5).osm|*|building;landuse|NOREPROJ
#
SplitGrid|AGN|*|building="*"
#
#Add attribute to indicate the type of building
#1 = ALMOST RECTANGLE (BASED ON AREA RATIO)
#2 = REGULAR SHAPED (MANY PARALLEL EDGES)
#3 = CONVEX POLYGONS
#4 = CONCAVE POLYGONS
#
AddAttribute|FTYPE="POLYGON" And building="*"|Integer;BUILDTYPE|5
AddAttribute|FTYPE="POLYGON" And building="*" And BUILDTYPE=5 And FAREARAT>0.80|Integer;BUILDTYPE|1
AddAttribute|FTYPE="POLYGON" And building="*" And BUILDTYPE=5 And FNUMVERT<10 And FNUMPERPANG>3 And FNUMNOTPAR<2|Integer;BUILDTYPE|3
AddAttribute|FTYPE="POLYGON" And building="*" And BUILDTYPE=5 And FCONVEX=1|Integer;BUILDTYPE|4
#
# Classify industrial/commercial buildings

AddAttributeIfInside|FTYPE="POLYGON" And building="*"|LUCODE=16|String;BUILDCAT|INDUSTRIAL
AddAttributeIfInside|FTYPE="POLYGON" And building="*"|LUCODE=15|String;BUILDCAT|COMMERCIAL

# Add attribute for roof type

AddAttribute|FTYPE="POLYGON" And building="*" And FWIDTH>5|String;ROOFTYPE|PEAKED_ALL
AddAttribute|FTYPE="POLYGON" And building="*" And FWIDTH>5 And FLENGTH<12|String;ROOFTYPE|PEAKED_SIMPLE
AddAttribute|FTYPE="POLYGON" And building="*" And FWIDTH>20|String;ROOFTYPE|PEAKED_LOW_PITCH
AddAttribute|BUILDCAT="INDUSTRIAL"|String;ROOFTYPE|PEAKED_LOW_PITCH
AddAttribute|BUILDCAT="COMMERCIAL"|String;ROOFTYPE|PEAKED_LOW_PITCH


# Create buildings autogen
CreateAGNGenBuild|BUILDTYPE<3 And ROOFTYPE="PEAKED_ALL"|{c05c5106-d562-4c23-89b8-a4be7495b57c}|MAXRATIO=2
CreateAGNGenBuild|BUILDTYPE<3 And ROOFTYPE="PEAKED_SIMPLE"|{d4ee02a2-ed47-4f10-b98c-502516983383}
CreateAGNGenBuild|BUILDTYPE<3 And ROOFTYPE="PEAKED_LOW_PITCH"|{a9b0e686-0758-4294-a760-9bb4fd341621}


ExportAGN|P3D v4|C:\Users\Administrator\Desktop\test\sp\texture
ExportBGL|P3D v4|ceshi|C:\Users\Administrator\Desktop\test\sp\bgl|KEEPXML
 
Hi,

But in this script you are only making autogen buildings. Autogen buildings can only be exported to autogen files, not to BGL files.

If you want to export a building to a BGL file you need to create it with the Create3DBuilding step instead. These can be exported to BGL files.
 
Hi,

But in this script you are only making autogen buildings. Autogen buildings can only be exported to autogen files, not to BGL files.

If you want to export a building to a BGL file you need to create it with the Create3DBuilding step instead. These can be exported to BGL files.
hi,arno.Thanks for the reply, I will try again what you said. have en error often occurs at the end of the run.The error is :
BglXWriter Error Failed to locate Prepar3Dv4 BGLComp, please update the path in the options. Which settings do I need to change?
 
in Mcx; Options / Exporter settings / BGL Writer - check your bglcomp.exe path; this is part of the sdk installation (must have installed sdk either for fsx or p3d). In short; check where your p3d or fsx sdk is installed; look for the bglcomp.exe file and add its path to mcx.
 
in Mcx; Options / Exporter settings / BGL Writer - check your bglcomp.exe path; this is part of the sdk installation (must have installed sdk either for fsx or p3d). In short; check where your p3d or fsx sdk is installed; look for the bglcomp.exe file and add its path to mcx.
微信图片_20241116221330.png
Here's my setup I didn't have fsx and p3d installed, is it okay if I don't install these two software?
 
It's OK to not have the sim installed, as long as you have the SDK. You need to set the BGLComp and XtoMdl path to be able to export to BGL. Now you only set the XtoMdl path.

If you have the SDK installed with the installer, scenProc will find the tools automatically using the registry.
 
It's OK to not have the sim installed, as long as you have the SDK. You need to set the BGLComp and XtoMdl path to be able to export to BGL. Now you only set the XtoMdl path.

If you have the SDK installed with the installer, scenProc will find the tools automatically using the registry.
I see, thank you! But when I set the path to save, it says that I can't use the path with red, but it don't show red. And i can't save the settings either. And when I type in the filter, it doesn't give me any hints, it doesn't autocomplete,
2.png
This is on the manual,
1731809245521.png
It's mine,There was no hint of it, I don't know what the problem is. Is it an issue with my version?
 

Attachments

  • 1731809238324.png
    1731809238324.png
    5.6 KB · Views: 90
1731809245521.png


according to your setting the path to your osm file point to a file called .map (5).osm - check the file name as do not look correct.
 
Did you set the BGLComp path as well in the settings? Before you had it empty.

And indeed check your osm file name, it looks weird.
 
Did you set the BGLComp path as well in the settings? Before you had it empty.

And indeed check your osm file name, it looks weird.
I can't save it after I set it, but I can save it in version 3.0. By the way, I didn't find the 64-bit version of version 3.1, I used the developer version
 
scenProc is only available as 64 bit now, there is no 32 bit version anymore.

Can you show your options screen again and the exact error message from the log?
 
Hello, when I try to output BGL, this error message pops up, how to solve it? like thie:
ystem.IndexOutOfRangeException: 索引超出了数组界限。
在 ASToFra.scenProc.Steps.Create3DBuildingSettings..ctor(String[] arguments)
在 ASToFra.scenProc.Steps.Create3DBuilding.Process(List`1 cells, String[] arguments)
在 ASToFra.scenProc.Processor.SceneryProcessor.Process()
在 ASToFra.scenProc.Processor.SceneryProcessor.ProcessConfig(String filename, List`1 commands)
 
Back
Top