Better Object Properties Export

Hi all,

I am trying to better export Object Properties for Analysis in Excel with these improvements:

  • Unit consistency (always export to m regardless of input file unit).
  • Area centroid X, Y, Z on separate columns.
  • Layer and sublayers on separate columns.
  • Values exported trough CSV are not recognized as numbers in Excel.

I managed to create a python 3 script which Exports Area and Centroids to a XLSX file but:

A - Script works in ScriptEditor

B - Alias / RunPythonScript fails

openpyxl is not available in the Python environment used by RunPythonScript (alias).

Can openpyxl be installed in the Python environment used by RunPythonScript?

Suggested alternatives to OpenPyxl?

How do I create a .RHP plug-in to run it like a native command?

Thanks!

The legacy RunPythonScript command will only run Python 2 “IronPython” scripts.

Use -_ScriptEditor _Run "C:\Path\script.py" for your alias/macro/button.

Thank you Michael

this way ScriptEditor is started with the script loaded

nevertheless python file is opened as well in another editor.

I found in the meantime another solution which avoid the need to open ScriptEditor:

as suggested here I use the ScriptManager utility in Dale’s Garage. It provides a panel that list scripts in a folder. The scripts in the folder can be easily run from a double-click. If you do not have Dale’s Garage, use the PackageManager to load it.