Home > SYS_FileManager > importProjectByProjectFile
SYS_FileManager.importProjectByProjectFile() method
This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
Use project file import project
Signature
function importProjectByProjectFile(
projectFile: File,
fileType?:
| 'JLCEDA'
| 'JLCEDA Pro'
| 'EasyEDA'
| 'EasyEDA Pro'
| 'Allegro'
| 'OrCAD'
| 'EAGLE'
| 'KiCad'
| 'PADS'
| 'LTspice',
props?: {
importOption?: ESYS_ImportProjectImportOption;
schematicObjectStyle?: ESYS_ImportProjectSchematicObjectStyle;
associateFootprint?: boolean;
associate3DModel?: boolean;
importFootprintNotesLayer?: boolean;
},
saveTo?:
| {
operation: 'New Project';
newProjectOwnerTeamUuid: IDMT_TeamItem['uuid'];
newProjectOwnerFolderUuid?: IDMT_FolderItem['uuid'];
newProjectName?: string;
newProjectFriendlyName?: string;
newProjectDescription?: string;
newProjectCollaborationMode?: EDMT_ProjectCollaborationMode;
}
| { operation: 'Existing Project'; existingProjectUuid: IDMT_BriefProjectItem['uuid'] }
| { operation: 'Offline Client Local Path'; folderPath: string },
librariesImportSetting?: {
ownerTeamUuid: IDMT_TeamItem['uuid'];
deviceClassification?: Array<string>;
symbolClassification?: Array<string>;
footprintClassification?: Array<string>;
createDeviceForSingleSymbol?: boolean;
updateExistingLibrariesWithTheSameName?: boolean;
},
): Promise<IDMT_BriefProjectItem | undefined>;2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
Parameters
Parameter | Type | Description |
|---|---|---|
projectFile | File | Project file |
fileType | 'JLCEDA' | 'JLCEDA Pro' | 'EasyEDA' | 'EasyEDA Pro' | 'Allegro' | 'OrCAD' | 'EAGLE' | 'KiCad' | 'PADS' | 'LTspice' | (Optional) File type |
props | { importOption?: ESYS_ImportProjectImportOption; schematicObjectStyle?: ESYS_ImportProjectSchematicObjectStyle; associateFootprint?: boolean; associate3DModel?: boolean; importFootprintNotesLayer?: boolean } | (Optional) Import parameters. Refer to the configuration items in the **Import** window of the EDA front end |
saveTo | { operation: 'New Project'; newProjectOwnerTeamUuid: IDMT_TeamItem['uuid']; newProjectOwnerFolderUuid?: IDMT_FolderItem['uuid']; newProjectName?: string; newProjectFriendlyName?: string; newProjectDescription?: string; newProjectCollaborationMode?: EDMT_ProjectCollaborationMode } | { operation: 'Existing Project'; existingProjectUuid: IDMT_BriefProjectItem['uuid'] } | | (Optional) Save To project parameter |
librariesImportSetting | { ownerTeamUuid: IDMT_TeamItem['uuid']; deviceClassification?: Array<string>; symbolClassification?: Array<string>; footprintClassification?: Array<string>; createDeviceForSingleSymbol?: boolean; updateExistingLibrariesWithTheSameName?: boolean } | (Optional) 库导入配置 |
Returns
Promise<IDMT_BriefProjectItem | undefined>
Brief project properties of the imported project
Remarks
Extracting library-related configurations is not supported yet. If the library needs to be extracted, it will be extracted according to the default configuration