Project
A Project object represents a project and its tree of project items in MapForce.
Properties to navigate the object model:
•Application
•Parent
File handling:
•FullName
•Name
•Path
•Saved
•Save
•Close
Project tree navigation:
•Count
•Item
•_NewEnum
Project tree manipulation:
•AddActiveFile
•AddFile
•InsertWebService (Enterprise edition only)
•CreateFolder
Code generation:
•Output_Folder
•Output_Language
•Output_TextEncoding
•Java_BasePackageName
•GenerateCode
•GenerateCodeEx
•GenerateCodeIn
•GenerateCodeInEx
For examples of how to use the properties and methods listed above, see Example: Project Tasks. Note that, in order to perform operations that involve Web services, MapForce Enterprise edition is required.
Properties
Name | Description |
---|---|
Read-only. This property supports language-specific standard enumeration. | |
Read-only. Retrieves the top-level application object. | |
Read-only. Retrieves number of children of the project's root item. For examples, see Item or _NewEnum | |
Path and name of the project file. | |
Read-only. Returns the child at n position of the project's root. The index is 1-based (the first index is 1). The largest valid index is Count. For an alternative, see _NewEnum. | |
Sets or gets the base package name of the Java packages that will be generated. This property is used only when generating Java code. | |
Read-only. Name of the project file without file path. | |
Sets or gets the default output folder used with GenerateCode and GenerateCodeIn. Project items can overwrite this value in their CodeGenSettings_OutputFolder property, when CodeGenSettings_UseDefault is set to false. | |
Sets or gets the default language for code generation when using GenerateCode. Project items can overwrite this value in their CodeGenSettings_OutputLanguage property, when CodeGenSettings_UseDefault is set to false. | |
Sets or gets the text encoding used when generating XML-based code. | |
Read-only. The parent object according to the object model. | |
Read-only. Path of the project file without name. | |
Read-only. True if the project was not modified since the last Save operation, false otherwise. |
Methods
Name | Description |
---|---|
Adds the currently open document to the mapping folder of the project's root. | |
Adds the specified document to the mapping folder of the project's root. | |
Closes the project without saving. | |
Creates a new folder as a child of the project's root item. | |
Generates code for all project items of the project. The code language and output location is determined by properties of the project and project items. | |
Generates code for all project items of the project. The code language and output location are determined by properties of the project and project items. An object that can be used to iterate through all messages issued by the code generation process is returned. These messages are the same as those shown in the Messages window of MapForce. | |
Generates code for all project items of the project in the specified language. The output location is determined by properties of the project and project items. | |
Generates code for all project items of the project in the specified language. The output location is determined by properties of the project and project items. Returns an object that can be used to iterate through all messages issued by the code generation process. These messages are the same as those shown in the Messages window of MapForce. | |
Inserts a new Web service project into the project's Web service folder. If i_bGenerateMappings is true, initial mapping documents for all ports get generated automatically. | |
Saves the project to the file defined by FullName. |
Events
Name | Description |
---|---|
This event is triggered when the project is closed. The project object passed into the event handler should not be accessed. The corresponding open event is Application.OnProjectOpened. |