Eplan Platform API
Eplan.EplApi.HEServices Namespace / Masterdata Class / GenerateMacrosFromMacroProject Method / GenerateMacrosFromMacroProject(ICollection<StorableObject>,String,String,Boolean) Method
Collection of objects with macro definition.
Specifies output directory for window macros. If empty or null default macro directory is used.
Specifies output directory for window macros. If empty or null default macro directory is used.
If the output file already exists specifies wheather it should be overwritten.
Example

In This Topic
    GenerateMacrosFromMacroProject(ICollection<StorableObject>,String,String,Boolean) Method
    In This Topic
    Generate macros from collection of objects with macro definition.
    Syntax

    Parameters

    colObjects
    Collection of objects with macro definition.
    strWindowMacroDirectory
    Specifies output directory for window macros. If empty or null default macro directory is used.
    strPageMacroDirectory
    Specifies output directory for window macros. If empty or null default macro directory is used.
    bOverwriteExistingMacros
    If the output file already exists specifies wheather it should be overwritten.
    Exceptions
    ExceptionDescription
    A parameter was set to a null reference.
    Parameters are invalid, e.g. collection of objects is empty.
    Internal interface for master data could not be created.
    Macros cannot be exported.
    Example
    The following examples shows how to use method GenerateMacrosFromMacroProject.
    List<StorableObject> lObjects = new List<StorableObject>();
    lObjects.Add(oTestProject.Pages[0]); //Page with macro box - generates window macro 
    lObjects.Add(oTestProject.Pages[3]); //Page with macro definition - generates page macro
    lObjects.Add(oTestProject.InstallationSpaces[0]); //InstallationSpace with macro definition - generates window macro                
    lObjects.Add(oMacroBox); //MacroBox - generates window macro
    
    // Generate macros to default macros directory    
    new Masterdata().GenerateMacrosFromMacroProject(lObjects, null, null, true);
    
    
    See Also