Showing results for 
Search instead for 
Did you mean: 


Valued Contributor
Valued Contributor



I would know when a document ".par" was already convert to sheetmetal.

A way, it's to look the tree and find "Convert_X".

To automate this, i surch in design Edgebar Features a constant for the type "Convert" feature.

        objModelPar = objFoldedDoc.Models(1)

        objDesign = objFoldedDoc.DesignEdgebarFeatures

        For j = 1 To objDesign.Count

               'Type : 451898536 : FeatureTypeConstants : modMain.Main_Convert --> id pour convert_X

               If (objDesign.Item(j).Type = 451898536) Then

                   Call wind.Log.AddItem("La pièce : " & objFoldedDoc.Name & " n'a pas été converti. Un fichier convert existe déjà.", k = k + 1)

                   GoTo CONVERT_FALSE_sm

               End If


I found this code in VB 6 ... I can't reproduce this in c#, because i don't know the type of "objDesign.Item(j)" therefore i cant't use objDesign.Item(j).Type !

First : Do you know the type of return for objDesign.Item(j) ?

Next : Do you the good constant for convert feature ? (better than "= 451898536").




Posted by: Jean-Christophe Brabant
Post date: 2/27/2009 2:14:46 AM


RE: FeaturesTypeConstant

Valued Contributor
Valued Contributor


See if the attached project helps.  Here is the source also.using System;using System.Collections.Generic;using System.Text;using System.Reflection;using System.Runtime.InteropServices;namespace DesignEdgebarFeatures{ class Program { static void Main(string[] args) { SolidEdgeFramework.Application application = (SolidEdgeFramework.Application)Marshal.GetActiveObject("SolidEdge.Application"); SolidEdgePart.PartDocument partDocument = (SolidEdgePart.PartDocument)application.ActiveDocument; SolidEdgePart.EdgebarFeatures edgebarFeatures = partDocument.DesignEdgebarFeatures; for (int i = 1; i


Posted by: Jason Newell
Post date: 3/3/2009 6:28:46 AM

RE: FeaturesTypeConstant

Valued Contributor
Valued Contributor

Thanks a lot for your answer.


It's funny, it doesn't exist any SolidEdgeConstants.FeatureTypeConstants.igxxxx for "Convert_x" ...


But i use this, and it perform properly :


object feature = objDesign.Item(i);

object featureName = feature.GetType().InvokeMember("Name", BindingFlags.GetProperty, null, feature, null);


if (((string)featureName).Contains("Convert"))

converti = true;


Posted by: Jean-Christophe Brabant
Post date: 3/11/2009 4:33:02 AM