Start a new topic

Converting database units

Original Post by: rfoley Wed May 7 19:55:30 2014

I am looking for a function in the API to convert the database units of my OpenFlight file. Is this available in the API?

Original Post by: ChrisRogers Wed May 7 20:02:07 2014

There are two types of database unit conversions... One type updates the dimensions of your database objects by scaling them to the correct size in the new dimension being set. This option is great if your database is was modeled to scale but just modeled in the wrong database unit for your purposes. The other type simply changes the database so that the units of the database are interpreted as the new type. This option is great if you imported a database from a file format that does not have a unit type in it and you know that the modeler intended it to be of a certain unit.

The second type of conversion is available in the API, and can be accomplished by simply setting the units in the database header attributes. The first type of conversion is only a pro tool in Creator. We do not provide an API function to mimic this functionality. The API is perfectly capable of implementing this functionality from scratch though.

I hope this helps!

Original Post by: rfoley Wed May 7 21:21:14 2014

Is this a function that might be added in a future update of the API and if so would you know what version? I'm just wondering why this function isn't already in the API?

Original Post by: rfoley Wed May 7 21:24:20 2014

I also had a couple more question that would basically fall under this same topic. Can you export to .P3D through the API, and can you wall a face through the API? Currently all I seem to be able to do is export as a different version of FLT, is this correct?

Original Post by: ChrisRogers Wed May 7 21:57:31 2014

Since convert database units is a tool, it is not in the API. However we do have a mechanism for invoking tools with the API. If you are creating a script to run inside Creator, you can invoke convert database units. The same goes for the wall tool. If you are Creating a plugin for Creator, you can also invoke these two tools. If you are working on a standalone script or application, this is not an option unfortunately.

Login to post a comment