2.2.12.1.  Block [CATEGORIES]

A large number of functions are provided under [CATEGORIES].

Some well-known function names are:

  • isCatalog

  • isProject

  • hasAttr

  • hasName

  • is2d

  • is3d

  • isNat

  • is3dPart

  • is3dAsm

They all have one thing in common: they all start with "is" or "has" and are effectively posed as a question. These function names can be answered with either true or false. Other functions that are added should follow this pattern.

isCatalog

Function definition

isCatalog=InStr("%0",GetObject("iface.calcnameservice"). 
 start("DOC").Format("<CATALOGFOLDERNAME(0)>").value(),1)>0 

isCatalog = The name to call the function

InStr = VB function to get the position as a number in the search text where the searched string occurs.

InStr("the whole text with the search word somewhere", "search word", 1 for case insensitive) If the searched word or text is not found, a 0 is returned.

GetObject("iface.calcnameservice").start("DOC").Format("<CATALOGFOLDERNAME(0)>").value() = Function that returns the name of the catalog via various objects. objects returns the name of the catalog, the header (because 0)

%0 = transfer parameter - you can transfer values to functions, so-called parameters or arguments

>0 = a comparison operator. If the return value of the InStr function is greater than 0, true is returned.