def execute_command_cls(extcmd_type, arguments=None, clean_engine=False, fullframe_engine=False, alternate_mode=False): command_instance = extcmd_type() # this is a manual execution from python code and not by user command_instance.executedFromUI = False # pass the arguments to the instance if arguments: command_instance.argumentList = Array[str](arguments) # force using clean engine command_instance.baked_needsCleanEngine = clean_engine # force using fullframe engine command_instance.baked_needsFullFrameEngine = fullframe_engine # force using the alternate script command_instance.altScriptModeOverride = alternate_mode re = command_instance.Execute(create_tmp_commanddata(), '', DB.ElementSet()) command_instance = None return re
def execute_command_cls(extcmd_type, arguments=None, config_mode=False, exec_from_ui=False): command_instance = extcmd_type() # pass the arguments to the instance if arguments: command_instance.ScriptRuntimeConfigs.Arguments = \ framework.List[str](arguments) # this is a manual execution from python code and not by user command_instance.ExecConfigs.MimicExecFromUI = exec_from_ui # force using the config script command_instance.ExecConfigs.UseConfigScript = config_mode # Execute( # ExternalCommandData commandData, # string message, # ElementSet elements # ) re = command_instance.Execute(create_tmp_commanddata(), '', DB.ElementSet()) command_instance = None return re