We recommend using Visual Studio 2017

CubeDef.GetSchemaObject Method

Returns an object associated with the CubeDef from a specified schema rowset.

Namespace:  Microsoft.AnalysisServices.AdomdServer
Assembly:  msmgdsrv (in msmgdsrv.dll)

public Object GetSchemaObject(
	SchemaObjectType schemaObjectType,
	string uniqueName


Type: Microsoft.AnalysisServices.AdomdServer.SchemaObjectType
The SchemaObjectType enumeration value that represents the type of object to find.
Type: String
The unique name of the object to find.

Return Value

Type: Object
An Object that contains an object associated with the CubeDef.

This method can be used to retrieve Dimension, Hierarchy, Level, Member, Measure, NamedSet, and other objects that are associated with the CubeDef without navigating the collections associated with these objects.

If the uniqueName parameter is set to an empty string, or if the specified object cannot be found, an exception is raised.