Fixed null reference exception when component isn't a part document.
This commit is contained in:
@@ -22,7 +22,7 @@
|
|||||||
<UpdatePeriodically>false</UpdatePeriodically>
|
<UpdatePeriodically>false</UpdatePeriodically>
|
||||||
<UpdateRequired>false</UpdateRequired>
|
<UpdateRequired>false</UpdateRequired>
|
||||||
<MapFileExtensions>true</MapFileExtensions>
|
<MapFileExtensions>true</MapFileExtensions>
|
||||||
<ApplicationRevision>11</ApplicationRevision>
|
<ApplicationRevision>12</ApplicationRevision>
|
||||||
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
|
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
|
||||||
<UseApplicationTrust>false</UseApplicationTrust>
|
<UseApplicationTrust>false</UseApplicationTrust>
|
||||||
<PublishWizardCompleted>true</PublishWizardCompleted>
|
<PublishWizardCompleted>true</PublishWizardCompleted>
|
||||||
|
|||||||
@@ -286,6 +286,12 @@ namespace ExportDXF.Forms
|
|||||||
var model = item.Component.GetModelDoc2() as ModelDoc2;
|
var model = item.Component.GetModelDoc2() as ModelDoc2;
|
||||||
var part = model as PartDoc;
|
var part = model as PartDoc;
|
||||||
|
|
||||||
|
if (part == null)
|
||||||
|
{
|
||||||
|
Print(model.GetTitle() + " - skipped, not a part document");
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
var config = item.Component.ReferencedConfiguration;
|
var config = item.Component.ReferencedConfiguration;
|
||||||
|
|
||||||
var sheetMetal = model.GetFeatureByTypeName("SheetMetal");
|
var sheetMetal = model.GetFeatureByTypeName("SheetMetal");
|
||||||
|
|||||||
Reference in New Issue
Block a user