Привет !
Проделываю все точно по Help :
The wire reference creation will be done using a VisualBasic macro (.CATScript extension).
This macro calls an Electrical Library method. This method needs two arguments:
The catalog in which the wire references will be stored
A neutral file in which the wire references are described (CSV file defined in Excel).
The default column separator used by Electrical Library for CSV files is the semi-colon ";".
Copy the following files in your c:\Temp from the samples folder and uncheck the Read-only attribute:
CreateWires.CATScript
WiresDefinition.csv
CatalogOfWires.catalog
If you work on Unix platform, make sure you modify the paths consequently in the CreateWires.CATScript document.
1.Select the Tools -> Macro -> Macros... item.
2.Click Select... and choose the CATScript file.
'
' Wires reference creation and basic storage in a catalog
'
Language="VBSCRIPT"
Sub CATMain()
'
' Definition of input data
'
' WARNING: Define the absolute path of the inputs (csv file and catalog)
'
csvFile = "c:\Temp\WiresDefinition.csv"
catalogfile = "c:\Temp\CatalogOfWires.catalog"
'
' Open the catalog
'
Dim Catalog As Document
Set Catalog = CATIA.Documents.Open(catalogfile)
'
' Get the "ElectricalLibrary" workbench
'
Dim Wkb As Workbench
Set Wkb = Catalog.GetWorkbench("ElectricalLibrary")
'
' Create the wires references and store them in the catalog
'
Wkb.CreateWiresIntoCatalog csvFile, catalogfile
End Sub
3.Edit it and update the csvFile and catalogfile variable with the corresponding paths, if need be
4.Then run it!
Once the macro performed, the result looks like this:
if a mapping has been defined, the Reference tab will display this information.
Но выдает следующую ошибку (что это? опечатка? настройки? ):