AddBatchAttributes Method (Block Object)

Scope: Schematic editor

Object: Block Object

Prerequisites: None

Adds multiple unattached attributes on the active block as an encoded string.

Usage

Block.AddBatchAttributes(ByVal AttributeListString As String) As Boolean

Arguments

AttributeListString

Encoded string containing attributes to be added. The AttributeListString is specially formatted as shown below.

<visibility> <duplicate> Name = Value<CR>
(repeated for each attribute)

<visibility> should be one of the following integers:

  • 0 = Invisible

  • 1 = Name and value visible

  • 2 = Name only visible

  • 3 = Value only visible

<duplicate> should be one of the following integers:

  • 0 = add - add new attribute regardless of duplicates

  • 1 = replace - if attribute with this name exists, replace it

The <CR> represents a carriage return character (ASCII 13).

Return Values

As Boolean. True - the attributes were added successfully. False - the attributes could not be added.

Examples

This example adds two attributes.

char* string="0 0 FOO=BAR\r1 0 TEST=BATCH" 
pDisp->AddBatchAttributes(string);