Working with MultiViewBlockDefinition

Working with MultiViewBlockDefinition

Anonymous
Not applicable
661 Views
1 Reply
Message 1 of 2

Working with MultiViewBlockDefinition

Anonymous
Not applicable

Hello,

I 'm writting my project for AutoCAD Architecture on NET.API.

I would like to create definition for MultiViewBlock, search special Display Representation Definition for it and set block to show.

 

How could i get DisplayRepresentationDefinitionCollection from document ?

 

I've tried to do it by this code:

 

// getting dictionary for MultiViewBlock Definitions

var styleDictionary = new DictionaryMultiViewBlockDefinition(ActiveDatabase);
// checking if MVBlock definition exist

if (!styleDictionary.Has(_mvBlockStyleName, _transaction))
{
     // creating new MVBlockDefinition 
     var multiViewBlockDefinition = new MultiViewBlockDefinition();

     // adding mvBlock Definition to dictionary

     AddRecordToDictionary(styleDictionary, multiViewBlockDefinition, _mvBlockStyleName);

     // Getting count of Representation Definitions of current MVBlock Definitions (as the result i'm getting 0)

     var representationDefinitionsCount = multiViewBlockDefinition.DisplayRepresentationDefinitions.Count;
}

 

Sorry for my bad English.  

0 Likes
Accepted solutions (1)
662 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable
Accepted solution

This Link might help

 

http://www.theswamp.org/index.php?topic=36679.msg422189#msg422189

 

It shows using viewports, but try ObjectId of mv psrt in SetDisplayConf.......

0 Likes