Skip to content

8‐5. Export Commands

Yusuke Ogawa edited this page Mar 5, 2026 · 4 revisions

Be sure to back up the Master file before execution, as you will be editing the Master file directly.

What This Procedure Enables

You can execute the following export commands from the CLI:

export ai_context_file
export device_file
export l1_diagram *Added in Ver 2.6.3
export l2_diagram *Added in Ver 2.6.3
export l3_diagram *Added in Ver 2.6.3
export master_file_backup
export master_file_nodata

Basic Syntax

python [file path]/network_sketcher.py [command] --master [master file path]
  • The positions of [command] and --master [master file path] can be modified as follows: python [file path]/network_sketcher.py -master [master file path] [command]

export ai_context_file

Generates a context file for uploading to large language models (LLMs). Outputs network configuration information in text format for use in AI analysis and document generation. ⚠️ Security Warning: The AI context file exported by this command contains data from the master file, including all network (NW) configuration information. Please be aware that uploading this exported file to a large language model (LLM) carries a risk of data leakage.

python [file path]/network_sketcher.py export ai_context_file --master [master file path] --accept-security-risk

Options:

--accept-security-risk : Explicitly acknowledges the security risk and authorizes the export. Omitting this option will prompt a YES/NO confirmation screen for security risk consent.

  • ex.

+Export ai_context_file+

#python .\network_sketcher.py export ai_context_file --master “C:\work[MASTER]test.xlsx” --accept-security-risk

--- export_ai_context_file ---
** Exporting xx/xx
--- AI Context file created successfully ---
AI Context file: C:\work[AI_Context]test.txt
Size: 47,201 bytes

[Tips]

  • The output filename will automatically be [AI_Context]master_file_name.txt

export device_file

Exports the [DEVICE] file.

python [file path]/network_sketcher.py export device_file --master [master file path]
  • ex.

+Export device_file+

#python .\network_sketcher.py export device_file ‘SW-1’ --master “C:\work[MASTER]test.xlsx”
--- Device file create ---
--- Device file created successfully ---

[Tips]

  • The output filename will automatically be [DEVICE]master_file_name.xlsx

export l1_diagram

Exports the L1 (Physical Layer) network diagram as a PowerPoint file. You can select the diagram type with the --type option.

python [file path]/network_sketcher.py export l1_diagram --master [master file path] --type [diagram type]

Options:

--type : Specifies the diagram type. Available values are as follows. If omitted, all_areas_tag is used by default.

Value Description
all_areas All Areas diagram
all_areas_tag All Areas diagram with IF tags (default)
per_area Per Area diagram
per_area_tag Per Area diagram with IF tags
  • ex.

+Export l1_diagram (All Areas with IF tags)+

#python .\network_sketcher.py export l1_diagram --master "C:\work[MASTER]test.xlsx"
--- L1 Diagram (all_areas_tag) created successfully ---
File: C:\work[L1_DIAGRAM]AllAreasTag_test.pptx

+Export l1_diagram (Per Area)+

#python .\network_sketcher.py export l1_diagram --master "C:\work[MASTER]test.xlsx" --type per_area
--- L1 Diagram (per_area) created successfully ---
File: C:\work[L1_DIAGRAM]PerArea_test.pptx

[Tips]

  • Output filenames are automatically generated based on the diagram type:
    • all_areas → [L1_DIAGRAM]AllAreas_master_file_name.pptx
    • all_areas_tag → [L1_DIAGRAM]AllAreasTag_master_file_name.pptx
    • per_area → [L1_DIAGRAM]PerArea_master_file_name.pptx
    • per_area_tag → [L1_DIAGRAM]PerAreaTag_master_file_name.pptx
  • For all_areas and all_areas_tag, a summary page is automatically included
  • Output files are created in the same directory as the Master file

export l2_diagram

Exports the L2 (Data Link Layer) network diagram for a specified area as a PowerPoint file. You can select the target area with the --area option.

python [file path]/network_sketcher.py export l2_diagram --master [master file path] --area [area name]

Options:

--area : Specifies the target area name. If omitted, the first available area in the Master file is used by default.

  • ex.

+Export l2_diagram+

#python .\network_sketcher.py export l2_diagram --master "C:\work[MASTER]test.xlsx" --area Office
--- L2 Diagram (area: Office) created successfully ---
File: C:\work[L2_DIAGRAM]Office_test.pptx

[Tips]

  • The output filename will automatically be [L2_DIAGRAM]area_name_master_file_name.pptx
  • Only regular areas can be specified (waypoint areas such as WAN connection points are not available)
  • If the specified area does not exist, an error is displayed along with the list of available areas
  • Output files are created in the same directory as the Master file

export l3_diagram

Exports the L3 (Network Layer) network diagram as a PowerPoint file. You can select the diagram type with the --type option.

python [file path]/network_sketcher.py export l3_diagram --master [master file path] --type [diagram type]

Options:

--type : Specifies the diagram type. Available values are as follows. If omitted, all_areas is used by default.

Value Description
all_areas All Areas diagram (default)
per_area Per Area diagram
  • ex.

+Export l3_diagram (All Areas)+

#python .\network_sketcher.py export l3_diagram --master "C:\work[MASTER]test.xlsx"
--- L3 Diagram (all_areas) created successfully ---
File: C:\work[L3_DIAGRAM]AllAreas_test.pptx

+Export l3_diagram (Per Area)+

#python .\network_sketcher.py export l3_diagram --master "C:\work[MASTER]test.xlsx" --type per_area
--- L3 Diagram (per_area) created successfully ---
File: C:\work[L3_DIAGRAM]PerArea_test.pptx

[Tips]

  • Output filenames are automatically generated based on the diagram type:
    • all_areas → [L3_DIAGRAM]AllAreas_master_file_name.pptx
    • per_area → [L3_DIAGRAM]PerArea_master_file_name.pptx
  • Output files are created in the same directory as the Master file

export master_file_backup

Creates a backup of the current Master file. A backup file with a timestamp will be generated.

python [file path]/network_sketcher.py export master_file_backup --master [master file path]
  • ex.

+Export master_file_backup+

#python .\network_sketcher.py export master_file_backup --master “C:\work[MASTER]test.xlsx”
--- Backup Master file --- C:\work[MASTER]test_20251208145631.xlsx
--- Master file backup created successfully ---
Original file: C:\work[MASTER]test.xlsx
Size: 7,200 bytes
Backup file: C:\work[MASTER]test_20251208145631.xlsx
Size: 7,200 bytes
Verification: File sizes match ✓

[Tips]

  • Backup filenames are automatically generated as master_file_name_YYYYMMDDHHMMSS.xlsx
  • Creating a backup before making changes is recommended
  • Backup files are created in the same directory as the original Master file

export master_file_nodata

Creates an empty Master file template with no data. This can be used as a base file when creating a new network configuration from scratch.

python [file path]/network_sketcher.py export master_file_nodata --master [master file path]
  • ex.

+Export master_file_nodata+

#python .\network_sketcher.py export master_file_nodata --master “C:\work[MASTER]test.xlsx”
--- Empty master file created successfully ---
File: C:\work[MASTER]test.xlsx
Size: 7,145 bytes
Sheets: Master_Data, Master_Data_L2, Master_Data_L3
The file contains no areas or devices.

[Tips]

  • If the file specified with --master already exists, an error occurs and processing terminates.

Clone this wiki locally