basic infrastructure

This commit is contained in:
Stefan Tröger
2013-04-25 11:58:21 +02:00
committed by Stefan Tröger
parent 395557b096
commit d50f7f1787
42 changed files with 488 additions and 3460 deletions

View File

@@ -77,7 +77,7 @@ void CmdAssemblyAddNewPart::activated(int iMsg)
doCommand(Doc,"App.activeDocument().addObject('Assembly::ItemPart','%s')",PartName.c_str());
if(dest){
std::string fatherName = dest->getNameInDocument();
doCommand(Doc,"App.activeDocument().%s.Items = App.activeDocument().%s.Items + [App.activeDocument().%s] ",fatherName.c_str(),fatherName.c_str(),PartName.c_str());
doCommand(Doc,"App.activeDocument().%s.addPart(App.activeDocument().%s) ",fatherName.c_str(),PartName.c_str());
}
Command::addModule(App,"PartDesign");
Command::addModule(Gui,"PartDesignGui");
@@ -139,7 +139,7 @@ void CmdAssemblyAddNewComponent::activated(int iMsg)
doCommand(Doc,"App.activeDocument().addObject('Assembly::ItemAssembly','%s')",CompName.c_str());
if(dest){
std::string fatherName = dest->getNameInDocument();
doCommand(Doc,"App.activeDocument().%s.Items = App.activeDocument().%s.Items + [App.activeDocument().%s] ",fatherName.c_str(),fatherName.c_str(),CompName.c_str());
doCommand(Doc,"App.activeDocument().%s.addComponent(App.activeDocument().%s) ",fatherName.c_str(), CompName.c_str());
}
}