Reply
Solved! Go to solution

Groups in 3D parts

I am trying to group some features together in a 3D part but cannot find the VB net or VB6 code for it. I've done it before for draft files but can't work it out for part files. Can anyone please help?

6 REPLIES
Solution
Solution
Accepted by topic author Paul_Collins
‎08-27-2015 03:52 AM

Re: Groups in 3D parts

The following code groups all features into a single group:

    '----------------------------------------------------------------------
    ' PAR: Join all features into a single feature group
    '----------------------------------------------------------------------
    Dim objPart As PartDocument = objApp.ActiveDocument
    Dim objModel As Model = objPart.Models.Item(1)
    Dim objFeats As EdgebarFeatures = objPart.DesignEdgebarFeatures
    Dim featGroup As FeatureGroup = objModel.FeatureGroups.AddFeatureGroupsByRange(objFeats.Item(1), objFeats.Item(objFeats.Count))
    featGroup.Name = "All Features"

Re: Groups in 3D parts

Can anyone expand on this so if you have say 3 features in the 3D part how you would add 2 of them into a group rather than all of them?

Re: Groups in 3D parts

Please check the SDK help.

There are two methods to group features, the one I was using in my previous post groups all features in a range, from the first given feature until the last given feature.

If you need to group a set of features, collect them in an array first and pass this array later to the AddFeatureGroupBySet method.

Re: Groups in 3D parts

There does not seem to be any help on this topic anywhere not even in SDK? I will try to ask Siemens using IR again...

Re: Groups in 3D parts

This functionality was added in V20 and is mentioned in the online help (http://support.industrysoftware.automation.siemens.com/training/se/107/api/webframe.html).

Look for AddFeatureGroups in the index (see attached image).

 

Re: Groups in 3D parts

Martin. Thanks for your help with this. I've now got it sorted.