
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
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.
Solved! Go to Solution.