Question about features

Genius
Genius

I used to use the following to rename features in the feature tree but it no longer works.  any thoughts?

 

cSE.iFeatures = cSE.oPartDoc.Models.Item(1).Features.Count;
oModel.Features.Item(iFeatures).Name = "Weld Chamfer";

Bob Reinkemeyer
CAD Integration developer
Martin Sprocket and Gear Inc.
5 REPLIES

Re: Question about features

Valued Contributor
Valued Contributor

Hi,

 

You can try this,

 

objModel = objPart.Models.Item(1)
objfeats = objModel.Features

objModel.Features.Item(1).name = "test"

 

Its working for me.

 

Thanks,

Bala

 

Re: Question about features

Genius
Genius

that's what I have.  It was working before I switched over to the community dll.  the error essentially says the object contains no definition for "name"

Bob Reinkemeyer
CAD Integration developer
Martin Sprocket and Gear Inc.

Re: Question about features

Solution Partner Phenom Solution Partner Phenom
Solution Partner Phenom
Hi, since you select the last feature in list, what is the type of this feature. Maybe it does not have a Name attribute.
regards

JB
VS2015, SE ST10

Re: Question about features

Phenom
Phenom

Check if you need to call Recompute at document of feature level after renaming.

Re: Question about features

Genius
Genius

just to be clear, I'm looking to rename features in the feature pathfinder in the part document.

Bob Reinkemeyer
CAD Integration developer
Martin Sprocket and Gear Inc.