Code: Select all
cmd = QString::fromLatin1(
"App.ActiveDocument.%1.Pitch\n")
.arg(ObjectName);
Gui::Command::runCommand(Gui::Command::Doc, cmd);
Code: Select all
cmd = QString::fromLatin1(
"App.ActiveDocument.%1.Pitch\n")
.arg(ObjectName);
Gui::Command::runCommand(Gui::Command::Doc, cmd);
Code: Select all
App.ActiveDocument.Helix.Pitch
Code: Select all
pitch = App.ActiveDocument.Helix.Pitch
Code: Select all
Py::Module module("__main__");
Py::Dict dict = module.getDict();
Py::Float pitch(dict.getItem("pitch"));
double value = static_cast<double>(pitch);
Many thanks. I'll use this for future and as reference.
Code: Select all
App::Property* Property = docObj->getPropertyByName("Pitch");
App::PropertyQuantity* value = static_cast<const App::PropertyQuantity*>(Property);
Code: Select all
Property->getQuantity()