Start a new topic

mgExecute from standalone app??

Original Post by: gmendieta Thu Aug 14 10:55:49 2014


Morning!! did someone have problems trying to execute mgExecute from standalone python script??

A simple lines of code as:


mgSetModelingMode(db, fltPolygon)

mgExecute("Select All", None)

mgExecute("Normalize UVs", None)


is getting me overwhelmed hahaha. I wrote an own setUniqueName last week more or less because of the same problem, soo, for sure i am doing something wrong.


Thank you so much


EDIT: okkkk!!! so sorry, there is a similar topic covered some posts before

1 Comment

Original Post by: SteveThompson Mon Aug 18 15:51:21 2014


You cannot run mgExecute in a stand-alone script or program (to be precise... you can call the function but the function won't do anything if called in your stand-alone program/script). The "tools" that this function launch are contained in Creator so Creator must be there to "service" the request. This implies you can only call mgExecute from a plugin or script that is running inside of Creator. To allow a stand-alone program to do this would require ALL of Creator to be contained in the OpenFlight API.


In the OpenFlight API Reference page for mgExecute, it states:


DESCRIPTION


mgExecute executes a Creator command.


This function allows your plug-in tool or OpenFlight Script to execute tools in the Creator modeler environment.


Note: This function is not available in the stand-alone application environment.


Sorry if there was confusion.

Login to post a comment