Generates an EDZ file of the specified project components of the WiringDiagram type. The name of the created EDZ file is returned. In addition the path to the C# script has to be specified in a parameter. The name of this parameters has to be specified in the model variable Parameter Name For C# Script Arguments.
Argument | Type | Description |
---|---|---|
root | Root | Project component, subcomponents of the WiringDiagram type thereof are collected. |
partXmlFilepath | String | File path to the parts description (part.xml). |
pictureFilepath | String | File path to the parts image. |
companyCode | String | Company name. The specification may not be empty or zero. Is used to form an internal path specification. May only contain characters that are allowed for Windows folder names. |
targetFolderName | String | Name of the target directory, where the created EDZ file is stored. If a name or a relative path is specified, the created files are stored in the project directory. An absolute name can be specified alternatively. |
The following method creates an EDZ file from which a macro is created during importing to P8. The required values for the file path to the part image (pictureFilePath), the file path to the part description (partXmlFilePath) and the company code (companyCode) have to be specified via parameters in the model. The names of the parameters have to be specified in the model variables (see Eplan Data Zip (.edz) generation)!
Argument | Type | Description |
---|---|---|
root | Root | Project component, subcomponents of the WiringDiagram type thereof are collected. |
targetFolderName | String | Name of the target directory, where the created EDZ file is stored. If a name or a relative path is specified, the created files are stored in the project directory. An absolute name can be specified alternatively. |
In the following method the file path to the part description can be entered as an absolute path. The specified absolute path is scanned for the occurrence of the subfolder \partxml. The directory structure below this folder is subsequently used as a relative path.
Argument | Type | Description |
---|---|---|
wiringDiagram | WiringDiagram | ECAD component (e.g. page) in the ECAD-structure for which the schematic diagram should be created. |
partXmlFilepath | String | File path to the parts description (part.xml). |
pictureFilepath | String | File path to the parts image. |
companyCode | String | Company name. This specification may not be empty or zero. Is used to form an internal path specification. May only contain characters that are allowed for Windows folder names. |
targetFolderName | String | Name of the target directory, where the created EDZ file is stored. If a name or a relative path is specified, the created files are stored in the project directory. An absolute name can be specified alternatively. |
The following method creates an EDZ file from which a macro is created during importing to P8. The required values for the file path to the part image (pictureFilePath), the file path to the part description (partXmlFilePath) and the company code (companyCode) have to be specified via parameters in the model. The names of the parameters have to be specified in the model variables (see Eplan Data Zip (.edz) generation)!
Argument | Type | Description |
---|---|---|
wiringDiagram | WiringDiagram | ECAD component (e.g. page) in the ECAD-structure for which the schematic diagram should be created. |
targetFolderName | String | Name of the target directory, where the created EDZ file is stored. If a name or a relative path is specified, the created files are stored in the project directory. An absolute name can be specified alternatively. |
Path specification for partXmlFilepath:
c:/temp/edz/data/partxml/myParts/part.xml
Resulting path specification:
myParts/part.xml
The file path to the part image can be specified as an absolute path. The specified absolute path is scanned for the occurrence of the subfolder \picture. The directory structure below this folder is subsequently used as a relative path.
Path specification for pictureFilepath:
c:/temp/edz/data/pictures/myPictures/part.jpg
Resulting path specification:
myPictures/part.jpg
=type('ECAD.GenerateEdzForEcadProjetCommand').execute(mroot,
'c:\\parts\\descriptions\sensor001_part.xml',
'c:\\parts\\images\\sensor001.jpg','c:\\edz')
<action name="ECAD.GenerateEdzForEcadProjetCommand"
arguments="=List{mroot,
'c:\\parts\\descriptions\sensor001_part.xml',
'c:\\parts\\images\\sensor001.jpg','c:\\edz'}"
type="link">Create EDZ file</action>
import com.mind8.mechatronic.skill.eos.TypeClass;
TypeClass.findType(self.getUnitOfWork(),
"ECAD.GenerateEdzForEcadProjetCommand").perform
("execute",mroot,"c:\\parts\\descriptions\sensor001_part.xml",
"c:\\parts\\images\\sensor001.jpg","c:\\edz");