Community
Inside a plugin, I am creating a new clash test and trying to run it. Using this command "documentClash.TestsData.TestsRunAllTests();" it runs without any errors. However, if I try using "documentClash.TestsData.TestsRunTest(oTest);" where oTest is the newly created instance, it throws "ArgumentException Argument is not in Clash Detective Parameter name: test". No other tests are defined in the model !
SavedItemCollection clashTests = documentClash.TestsData.Tests;
documentClash.TestsData.TestsRunTest(clashTests[clashTests.Count-1] as ClashTest);
You can also try this:
private void RunClash(string clashTestName)
{
Document doc = NavisApp.ActiveDocument;
DocumentClash clash = doc.GetClash();
DocumentClashTests clashTests = clash.TestsData;
using (ClashTest clashTest = (ClashTest)clashTests.Tests.FirstOrDefault(t => t.DisplayName == clashTestName))
{
clash.TestsData.TestsRunTest(clashTest);
}
}
Can't find what you're looking for? Ask the community or share your knowledge.