Showing results for 
Search instead for 
Did you mean: 

Can't get the GetProfiles in AssenblyFeatures to work.

Valued Contributor
Valued Contributor


Hi All:

I'm new to and can't seem to get the profile set inside of an assembly cutout feature. Below is the code I'm using. I keep getting an error on the GetProfiles call. Any suggestions would be greatly appreciated.




Imports System.Windows.Forms

Imports SolidEdgeFramework

Imports SolidEdgeAssembly



 Sub Main()Dim objApplication As SolidEdgeFramework.Application = Nothing

 Dim objDocument AsSolidEdgeDocument = Nothing

 Dim objFeatures As SolidEdgeAssembly.AssemblyFeaturesExtrudedCutouts = Nothing

 Dim objFeature As SolidEdgeAssembly.AssemblyFeaturesExtrudedCutout = Nothing

 Dim objDimensions As SolidEdgeFrameworkSupport.Dimensions = Nothing

 Dim objDimension As SolidEdgeFrameworkSupport.Dimension = Nothing

 Dim objDimStyle As SolidEdgeFrameworkSupport.DimStyle = Nothing

 Dim objNew AsObject = Nothing



 Dim Dimensions() AsObject = NewObject() {}Dim Profiles() AsObject = NewObject() {}Dim strDocType AsString = " "

 Dim strDimType AsString = " "

 Dim intProfileCount AsInteger

 Dim intCount AsInteger


 ' Connect to a running instance of Solid Edge


objApplication =



 MessageBox.Show("Solid Edge must be running", "Error Message")Exit Sub


 ' Get a reference to the active document

objDocument = objApplication.ActiveDocument

 'Determine SE document type



strDocType = SelectCase objDocument.TypeCaseDocumentTypeConstants.igAssemblyDocument"Assembly"


strDocType = CaseDocumentTypeConstants.igDraftDocument"Draft"


strDocType = CaseDocumentTypeConstants.igPartDocument"Part"


strDocType = CaseDocumentTypeConstants.igSheetMetalDocument"Sheet Metal"


strDocType = CaseDocumentTypeConstants.igWeldmentAssemblyDocument"Assembly"


 If strDocType "Assembly"Then



 MessageBox.Show("This is not a Assembly Document", "Error")EndIf

 ' Get model

objFeatures = objDocument.AssemblyFeatures.AssemblyFeaturesExtrudedCutouts

intCount = objFeatures.Count


 MessageBox.Show(intCount, "number cutouts")Dim i AsInteger


objFeature = objFeatures(i - 1)

objFeature.GetProfiles(intProfileCount, Profiles)


 For i = 1 To intCountMessageBox.Show(intProfileCount, "Test")Next





Posted by: John Pearson
Post date: 6/15/2010 10:52:39 AM


RE: Can't get the GetProfiles in AssenblyFeatures to work.

Valued Contributor
Valued Contributor



Your recent call to the Technical Access Center, Incident Report (IR) Number 6366080 opened on 16-JUN-2010, has been researched by our GTAC software engineers. It has been determined that this IR requires resolution by our SOLID_EDGE development team. This IR was converted into a problem report (PR) 16-JUN-2010 and is now referenced as PR Number 6366080, with a priority code of 2 Serious.


Posted by: John Pearson
Post date: 6/16/2010 8:52:44 AM