Wire creation and storage in catalog - непонятная проблема

Cредства проектирования оборудования и систем.

Wire creation and storage in catalog - непонятная проблема

Сообщение ravitex » 27 дек 2007 04:07

Привет !
Проделываю все точно по 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.

Но выдает следующую ошибку (что это? опечатка? настройки? ):
Вложения
Аватара пользователя
ravitex
Участник
Участник
 
Сообщения: 72
Зарегистрирован: 10 окт 2007 13:12
Откуда: Eesti

Re: Wire creation and storage in catalog - непонятная проблема

Сообщение [PTM] » 27 дек 2007 09:07

Он тебе русским языком говорит что ошибка тут
Wkb.CreateWiresIntoCatalog csvFile, catalogfile

так что либо синтаксис неправильный ,либо оно такое не поддерживает удачи в поиске и отладке)
Изображение
Аватара пользователя
[PTM]
Moderator
 
Сообщения: 2139
Images: 40
Зарегистрирован: 13 сен 2007 13:03
Откуда: Rzn
Blog: View Blog (15)

Re: Wire creation and storage in catalog - непонятная проблема

Сообщение ravitex » 27 дек 2007 09:18

Да я и сам по номеру строки вижу ,где ошибка.Но как она там может быть,если это туториал из Help(версии совпадают)???
ясно ,что проблема в Wkb.CreateWiresIntoCatalog
Аватара пользователя
ravitex
Участник
Участник
 
Сообщения: 72
Зарегистрирован: 10 окт 2007 13:12
Откуда: Eesti

Re: Wire creation and storage in catalog - непонятная проблема

Сообщение ExtraRight » 27 дек 2007 11:28

К сожалению мы тоже с этим столкнулись. Пытались найти Wkb.CreateWiresIntoCatalog в хелпе для Automation, но ничего не нашли :shock: :%)
Видимо, этот метод убрали, а хелп изменить забыли. Аналог метода мы тоже не нашли.
Аватара пользователя
ExtraRight
Forum Manager
 
Сообщения: 1575
Зарегистрирован: 11 сен 2007 18:50
Откуда: Нижний Новгород
Blog: View Blog (8)

Re: Wire creation and storage in catalog - непонятная проблема

Сообщение ravitex » 27 дек 2007 12:28

ExtraRight писал(а):К сожалению мы тоже с этим столкнулись. Пытались найти Wkb.CreateWiresIntoCatalog в хелпе для Automation, но ничего не нашли :shock: :%)
Видимо, этот метод убрали, а хелп изменить забыли. Аналог метода мы тоже не нашли.



написать бы нашим продавцам Catia об этом - там есть специлисты ,которые помогут разобраться,но на работе нет этой лицензии,боюсь не поймут откуда вопрос возник :(
Аватара пользователя
ravitex
Участник
Участник
 
Сообщения: 72
Зарегистрирован: 10 окт 2007 13:12
Откуда: Eesti


Вернуться в Equipment & Systems Engineering

Кто сейчас на конференции

Сейчас этот форум просматривают: нет зарегистрированных пользователей и гости: 1

cron