Product Documentation
Virtuoso Studio Design Environment SKILL Reference
Product Version IC23.1, November 2023

ddCatOpenEx

ddCatOpenEx( 
b_ddId 
t_categoryName 
t_mode 
x_keepEmpty 
)
=> b_objId / nil

Description

Opens a category with the given name using the mode to get the object ID.

Similar to ddCatOpen except that this function has an additional fourth argument indicating that a flag should be set in the category file so that the dd interface will not remove the category file when it is empty.

Arguments

b_ddId

The library ID or category ID (for hierarchical categories). If the object is a libId and the given name is " " or nil, the library's list of categories can be accessed or modified.

t_categoryName

The name of the category.

t_mode

The modes "a", "w", or "r". For more information, see ddGetObj.

x_keepEmpty

When x_keepEmpty is 1, the category files are not deleted, but, when x_keepEmpty is 0, the category files are deleted.

Value Returned

b_objId

The ID for the opened category.

nil

The category does not exist or cannot be opened in the specified mode.

By calling ddCatOpenEx( g_ddId t_categoryName t_mode nil), you get the same behavior as in ddCatOpen.

Examples

cat = ddCatOpenEx(libId "myCat" "a" "1")
ddCatAddItem(cat "cell1" "cell")
ddCatSave(cat)
ddCatClose(cat)

Updates (or creates) a category and adds a cell name to it.


Return to top
 ⠀
X