cancel
Showing results for 
Search instead for 
Did you mean: 

Commit vs commitFeature

Builder
Builder

What is the difference between commit and commitfeature?

Should I be using one over the other?

Should they both be called?

5 REPLIES

Re: Commit vs commitFeature

Esteemed Contributor
Esteemed Contributor

What is the parent method?

You can only commit a feature if it is a method that creates features, all other builders share the regular commit method, which is inherited by all builders.

Stefan Pendl, Systemmanager CAx, HAIDLMAIR GmbH
Production: NX10.0.3, VERICUT 8.0, FBM, MRL 3.1.4 | TcUA 10.1 MP7 Patch 0 (10.1.7.0) | TcVis 10.1
Development: VB.NET, Tcl/Tk    Testing: NX11.0 EAP, NX12.0 EAP

How to Get the Most from Your Signature in the Community

Re: Commit vs commitFeature

Builder
Builder
If the builder has a commit feature method? Should you use that instead of Commit?

Re: Commit vs commitFeature

Esteemed Contributor
Esteemed Contributor

What builder do you use?

Stefan Pendl, Systemmanager CAx, HAIDLMAIR GmbH
Production: NX10.0.3, VERICUT 8.0, FBM, MRL 3.1.4 | TcUA 10.1 MP7 Patch 0 (10.1.7.0) | TcVis 10.1
Development: VB.NET, Tcl/Tk    Testing: NX11.0 EAP, NX12.0 EAP

How to Get the Most from Your Signature in the Community

Re: Commit vs commitFeature

Siemens Phenom Siemens Phenom
Siemens Phenom

Commit() is a function in the base NXOpen.Builder class that is inherited by all builders and returns a NXObject.

 

CommitFeature is a function in the NXOpen.Features.FeatureBuilder class. It returns a NXOpen.Features.Feature.

 

Either one should commit the builder. CommitFeature() is a convenience function that directly returns the Feature object. If you use Commit(), you would have to cast the returned NXObject object to a Feature object if needed.

Re: Commit vs commitFeature

Siemens Phenom Siemens Phenom
Siemens Phenom

In my experience, you almost always have to cast the returned object to something fairly specific, anyway. So,for Feature objects, it doesn't matter very much whether you call Commit or CommitFeature. You certainly don't need to call both of them.

山田
yamada