pCon.planner Plugin SDK  Version 8.9
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Properties Events
Public Member Functions | Properties | List of all members
X3g::Plugin::BlockManager Class Reference

Block Manager. More...

Public Member Functions

IList< String^ >^ GetAllBlockNames ()
 Returns a list of all block names. More...
 
BlockCreateBlock (String^ pBlockName)
 Creates a new block. More...
 
BlockGetBlock (String^ pBlockName)
 Returns a block with given name. More...
 
void DeleteBlock (String^ pBlockName)
 Deletes a block and each block reference referencing that block. More...
 
void SaveBlock (String^ pBlockName, Stream^ pDwgStream, SaveBlockParams pParams)
 Saves block content to a dwg stream. More...
 
DbBlockReferenceGroup (IEnumerable< DbEntity^ >^pEntities, System::String^ pBlockName)
 Groups a collection of entities and returns the according DbBlockReference. More...
 
IList< DbEntity^ >^ Ungroup (DbBlockReference^ pBlockRef)
 Tries to explode a block reference and returns the resulting entities. More...
 

Properties

bool BlockUniquificationEnabled [get, set]
 Global setting which allows to control if a block is automatically made unique when user edits block content, i.e. More...
 

Detailed Description

Block Manager.

Member Function Documentation

X3g::Plugin::Block X3g::Plugin::BlockManager::CreateBlock ( String pBlockName)

Creates a new block.

Anonymous block naming is supported (e.g. "*E"). Unique block name will be generated if given block name is null or empty.

void X3g::Plugin::BlockManager::DeleteBlock ( String pBlockName)

Deletes a block and each block reference referencing that block.

IList< System::String^ > X3g::Plugin::BlockManager::GetAllBlockNames ( )

Returns a list of all block names.

X3g::Plugin::Block X3g::Plugin::BlockManager::GetBlock ( String pBlockName)

Returns a block with given name.

DbBlockReference X3g::Plugin::BlockManager::Group ( IEnumerable< DbEntity^ >^  pEntities,
System::String^  pBlockName 
)

Groups a collection of entities and returns the according DbBlockReference.

Works for modelspace entities only. Block with given name must not exist.

Parameters
pEntitiesEnumerable of the entities to be grouped.
pBlockNameThe Block name for the group.
Block name will be generated if parameter is null or empty.
void X3g::Plugin::BlockManager::SaveBlock ( String pBlockName,
Stream^  pDwgStream,
SaveBlockParams  pParams 
)

Saves block content to a dwg stream.

Returns false if saving failed.

If pVersion = Undefined the internal/loaded version of the document is used.

IList< DbEntity^ > X3g::Plugin::BlockManager::Ungroup ( DbBlockReference pBlockRef)

Tries to explode a block reference and returns the resulting entities.

Block reference must be in modelspace. Returns null if explode failed.

Property Documentation

bool X3g::Plugin::BlockManager::BlockUniquificationEnabled
getset

Global setting which allows to control if a block is automatically made unique when user edits block content, i.e.

when block is opened. Enabled by default.