powered by CADENAS

Manual

Manual

2.1.4. Launch

The actual actions run within a dll file. This is loaded per vbb script and therefore the corresponding function is started. In order to start classimport.vbb, the file is transferred to the CADENAS script host.

The application occurs via the command line.

You can assign special parameters to the launch. Either also via the command line or via declaration in the configuration file under $CADENAS_SETUP/classimport.cfg.

Obligatory launch parameters via the command line are as follows:

  1. classimport.vbb

    %cadenas_setup%/scripts/common/classimport.vbb

  2. -mode

    This parameter may have the following values:

    • new: all tables are rebuilt.

    • update: you can add, modify, or delete attributes, classes and rows.

    • images: bitmaps and STLs are imported/updated.

    • geoindex: the complete geometric index is reassembled.

    • checkgeoindex: every so often the "geoindex" is checked.

    • fastsearch: the index for the variable and text search is updated.

    • updateindex: the entire index is updated.

An exemplary launch per command line can be seen below:

%CADENAS%\bin\x86\32\cscripthost.exe 
%cadenas_setup%\scripts\common\classimport.vbb 
-mode new 
-logfile c:\import\logfile.txt 
-user erpuser 
-pwd erpuser

General information

  • The order of the parameter specifications is insignificant.

  • The specification of a launch parameter logfile is usually helpful.

  • All data can be updated cyclically per batch script.

  • Some parameters may be opened via command row as well as per configuration file.

    The following table contains a list of all possible launch parameters and the keys in the configuration files classimport.cfg.

Basic data

Launch via the command line Launch via the configuration file classimport.cfg  
 

[CLASSIMPORT]
NATIVETYPE=STLFILE

As a general rule, should not be changed.

CAD ID for the native parts to be created

-categoryname cat

[CLASSIMPORT]
CATEGORYNAME=cat

Value range: "cat" or "nat"

Default: cat

[Caution] Caution

In case you choose "nat", the CLASSNAME must be "nativeparts"! Otherwise the error message "Catalog name in category nat must be nativeparts" will show up in classimport.err.

Name of the category

For "cat" the catalog shows up under "Catalogs". For "nat" under "Own parts".[a]

[Note] Note

For "nat", the import mode "new" is not possible! Use "update" instead.

-classname example

[CLASSIMPORT]
CLASSNAME=example

Internal catalog name

(use only lower case letters)

-classdesc "Own Parts"

[Note] Note

If there are empty spaces in the description text, then you must use quotation marks.

[CLASSIMPORT]
CLASSDESC=Own Parts

Catalog description

(all characters are allowed)

For "nativeparts" in the category "nat", the value is ignored.

-classbmp c:\import\catalog.bmp

[CLASSIMPORT]
CLASSBMP=C:\import\catalog.bmp

Path to catalog picture

For "nativeparts" in the category "nat", the value is ignored.

 

[CLASSIMPORT]
UNIT=mm

Value range: mm / INCH

Default: mm

You can now indicate which unit the imported STLs have.[b]

[a] Up to now, parts were only able to be imported into the "Catalogs" category. With V9, you can now also import into the category "My parts".

[b] as of V9.02

Import files

Launch via the command line Launch via the configuration file classimport.cfg Description

-klvkn c:\import\
 classstruct.txt

[CSV_ClassStructure]
FILE=c:\import\
 classstruct.txt
SEP=;
QUOTE="
COLWIDTH=

The file classstruct.txt contains the data for the assembly of the class structure (tree).

-klast c:\import\classdef.txt

[CSV_ClassDefinition]
FILE=c:\import\classdef.txt
SEP=;
QUOTE="
COLWIDTH=

The file classdef.txt contains the class names in different languages.

-auspr c:\import\
 attributedata.txt

[CSV_AttributeData]
FILE=c:\import\
 attributedata.txt
SEP=;
QUOTE="
COLWIDTH=

The file attributedata.txt contains the attribute values.

-merkst c:\import\
 attributedef.txt

[CSV_AttributeDefinition]
FILE=c:\import\
 attributedef.txt
SEP=;
QUOTE="
COLWIDTH=

The file attributedef.txt is used for the assembly of the tables in PARTsolutions. All attributes must be described here.

-matnr c:\import\erpdata.txt

[CSV_ErpData]
FILE=c:\import\erpdata.txt
SEP=;
QUOTE="
COLWIDTH=

The file erpdata.txt contains the article or material master file data.

-delmat c:\import\delmat.txt

[CSV_DELMAT]
FILE=c:\import\delmat.txt
SEP=;
QUOTE="

Delete individual rows.

-prjtable c:\import\
 prjtable.txt

[CSV_PrjTable]
FILE=C:\import\prjtable.txt
SEP=;
QUOTE="
COLWIDTH=

Te file prjtable.txt contains the order of the columns in the PARTsolutions tables.

-imagelist c:\import\
 filelist.txt

[CSV_ImageImport]
FILE=C:\import\filelist.txt
SEP=;
QUOTE="

Use the file filelist.txt to import STL files, preview images (index) and technical views.

See Section 2.1.5.6, “Image import - filelist.txt ”.

When importing via the command line, please also not the information in the configuration file under$CADENAS_SETUP/ classimport.cfg.

Other parameters

Launch via the command line Launch via the configuration file classimport.cfg Description

-logfile c:\import\logfile.txt

The output of a log file is helpful in examining problem cases.

Status and error messages are issued.

-errfile c:\import\
 errorfile.txt

Only error messages are issued.

-user erpuser

Needed for LinkDB linking in order to import data into the database.

Name of the database user.

This is "erpuser" in the standard installation.

-pwd erpuser

Needed for LinkDB linking in order to import data into the database.

Password of the database user.

This is "erpuser" in the standard installation.

You must have adequate rights.

-languages german,english

[CLASSIMPORT]
LANGUAGES=german,english

If LANGUAGES are set, the language dependant columns must be available in the text files.

(KLBEZ_german, KLBEZ_english, etc. See Section 2.1.5.3, “Visible class name - classdef.txt ”)

-languagesforvalues 
 german,english

[CLASSIMPORT]
LANGUAGESFORVALUES=
 german,english

Languages for attribute values:

If LANGUAGESFORVALUES is set, then the language dependant columns must be available respectively in the attributedata.txt text file.

(VALDESC_german, VALDESC_english, etc. See Section 2.1.5.5.3.1, “Translatable text attributes”)

-nofastsearch

No index for the variable and text search is generated.

-nogeomsearch

No geometric index is generated

-noindexupdate

No index update is conducted

[Note] Note

Concerning structure changes, the index is usually updated automatically.

[CLASSIMPORT]
CLUSTERUPDATE=0/1

Default: 1

0: For changes in the Classimporter toolbar, no cluster update is performed. This allows you to work faster, but the cluster search (complex, geometric search) is no longer accurate.[a]

[CLASSIMPORT]
TEMPMODE=0/1

Default: 1

For changes via the Classimporter toolbar, a temporary directory is applied first. If all changes were successful, the content is transferred. Should an error occur in the meantime, no changes are transferred and the old status remains. This is the recommended way for productive environments.

If the value is set to '0' the wait time between the individual changed steps is less.

 

[CLASSIMPORT]
CHECKFILES=1

Value range 0/1

Default: 0

Check files

The prj, pol and tab files can be checked after import. In case these are defect or incomplete, an error message will be written in the log file: "File <...> is incomplete or corrupt."

 

[CLASSIMPORT]
DELETEPOOLFILES=0

Value range 0/1/2/3

Default: 0

Delete pool files

DELETEPOOLFILES is effective when structure with effects on data is changed, (e.g. when a class is deleted)

If, in the import file "classstruct.txt", the column "MODE" uses the value "del", the corresponding directory will be deleted from the 23dlibs directory.

classstruct.txt - with "MODE" = del

classstruct.txt - with "MODE" = del

Is set DELETEPOOLFILES=1 additionally, then the pool files are also deleted.

More details are found under Section 2.1.5.2, “Class tree - classstruct.txt ”.

 

[CLASSIMPORT]
LICKEY=%basekey%*
CATALOGSADDITIONAL*%catname%

License key for catalog:

%basekey% is replaced by PSOLBASEKEY

%catname% by the catalog name in capitals

-synconlyfolder klassenname

 

The importing of data cannot be limited to one specific branch of the class or directory tree.

Enter the desired class name here.

The entry must be carried out in lower case letters.

(only with "-mode new")

 
[CLASSIMPORT]
NOTSYNCHFOLDER

For "- mode new", normally all possible existing folders of the catalog are deleted and reassembled.

Exceptions are those folders which are declared under NOTSYNCHFOLDER.

Separator for the list: ";"

 

[CLASSIMPORT]
USESHORTDIRNAME=1

Value range 0/1

Default: 0

In some cases, the class names correspond to the directory setup (paths).

In this case, during import into the 23dlibs directory, very long directory names would be generated.

In order to avoid this, activating USESHORTDIRNAME is useful in this case.

See under Section 2.1.5.2.1, “Special case: Class names correspond to directory structure”.

[a] As of 9.02 this parameter no longer has any affect.