You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Assert.True(((CadDictionary)document.RootDictionary[CadDictionary.VariableDictionary]).TryGetEntry(CadDictionary.CurrentMultiLeaderStyle,outDictionaryVariablecurrentMultiLeaderStyleNameVariable),"Dictionary variable for CMLEADERSTYLE does not exist.");
61
-
Assert.True(currentMultiLeaderStyleNameVariable.Value==MultiLeaderStyle.DefaultName,"Dictionary variable CMLEADERSTYLE='standard' does not match.");
Assert.True(document.MLeaderStyles.TryGetValue(multiLeaderStyleName,outMultiLeaderStylemultiLeaderStyle),"MultiLeaderStyle for new name 'Test' not created.");
67
-
Assert.True(header.CurrentMultiLeaderStyle.Name==multiLeaderStyleName,"MultiLeaderStyle for new name 'Test' not set.");
68
-
69
-
Assert.True(currentMultiLeaderStyleNameVariable.Value==multiLeaderStyleName,"Dictionary variable CMLEADERSTYLE='Test' does not match.");
/// Updates the <see cref="DxfClass"/> in the document and their instance count.
211
-
/// </summary>
212
-
/// <param name="reset">Resets the list and clears any unnecessary classes.</param>
213
-
publicvoidUpdateDxfClasses(boolreset)
214
-
{
215
-
if(reset)
216
-
{
217
-
this.Classes.Clear();
218
-
}
219
-
220
-
DxfClassCollection.UpdateDxfClasses(this);
221
-
222
-
foreach(variteminthis.Classes)
223
-
{
224
-
item.InstanceCount=this._cadObjects.Values
225
-
.OfType<CadObject>()
226
-
.Where(c =>c.ObjectName==item.DxfName)
227
-
.Count();
228
-
}
229
-
}
230
-
231
217
/// <summary>
232
218
/// Create the default entries and objects for the <see cref="CadDocument"/>.
233
219
/// </summary>
@@ -317,6 +303,42 @@ public T GetCadObject<T>(ulong handle)
317
303
returnnull;
318
304
}
319
305
306
+
/// <summary>
307
+
/// Retrieves the current object of the specified type from the document's configuration.
308
+
/// </summary>
309
+
/// <typeparam name="T">The type of the object to retrieve. Must be a type that implements <see cref="CadObject"/> and <see
310
+
/// cref="INamedCadObject"/>.</typeparam>
311
+
/// <returns>The current object of the specified type, or throws an exception if the type is not supported.</returns>
312
+
/// <exception cref="NotSupportedException">Thrown if the specified type <typeparamref name="T"/> is not a configurable type in the document.</exception>
0 commit comments