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

Using quotes in scenProc

Messages
7
Country
hungary
Something I discovered today is that filters don't like using single quotes for string literal in scenProc. So something like

Code:
CreateXMLLibObj|FROMFILE="streets_pt_res.shp" AND class=6 AND bridge='F' AND osmlayer=0|{FB7F83BB-88FF-4632-A521-8DD27FA6230F}|heading|0|7.0|0.9|NOCRASH;NOSHADOW|

in my script "failed" silently - it didn't give an error but gave me no objects returned where I expected lots.

Changing the single quote bridge='F' to double quote bridge="F" worked as expected.

It's a minor inconvenience becuase I'm transplanting SQL from ogr2ogr into scenProc and it turns out I can't be too lazy with my copy and pastes.

It did make me wonder how literal quotes work in scenProc : e.g. if you wish to check for a double quote would you write it like this: """ or '"' or "\"" ? I haven't tried it yet but I'm hoping I can get a "quote" from Arno :)

Only mention in the scenProc manual about quotes is page 18.
 

arno

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

I would have to check how the library that does the filter logic supports this, but I never encountered any attribute values that actually contain quotes. I think that would be a rare thing.
 
Messages
7
Country
hungary
It's not really so much the check for a quote, more my surprise that a single quote didn't have the same effect as a double quote. The fact the parser silently ignored it made me wonder if it was treating it as a variable. That's really the bit I'd like to know more about!
 
Top