cancel
Showing results for 
Search instead for 
Did you mean: 

How do we get the parent CAM.CAMFeature of a CAM.FBM.Feature

Esteemed Contributor
Esteemed Contributor

We are in the process of migrating our NX 8.5 MKE rules to NX 10.0 MKE rules with the new drilling operations.

We have found that changing depth and such manually through a rule will not be transferred reliably to the resulting operations in different situations.

 

I am now creating a custom DLL to correct everything before the tool path is generated.

 

I can get the CAM.FBM.Feature from the operation, but I don't know how to get the parent CAM.CAMFeature from it, since I need additional attributes available only in the CAM.CAMFeature to correct the Attributes of the CAM.FBM.Feature.

 

Below find an image of what I mean.

 

CAMFeatureProblem.png

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: NX12.0

How to Get the Most from Your Signature in the Community
7 REPLIES

Re: How do we get the parent CAM.CAMFeature of a CAM.FBM.Feature

Esteemed Contributor
Esteemed Contributor

The solution was to get the geometry parent object, since the features contained there are in the same order as the features contained in the operation.

 

Find my current solution in a post below.

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: NX12.0

How to Get the Most from Your Signature in the Community

Re: How do we get the parent CAM.CAMFeature of a CAM.FBM.Feature

Valued Contributor
Valued Contributor

Hello Stephan,

 

Thanks for sharing your .dll file.

 

When I executed your file through Execute -> NX Open, an error message poped up "Failed to load image. Function name: ufusr". Do you have any ideas about that?

 

Besides, what are the "Pattern" variables for? Like "TiltedTopPattern"?

 

Thanks,

Kai

Re: How do we get the parent CAM.CAMFeature of a CAM.FBM.Feature

Esteemed Contributor
Esteemed Contributor

I do rename any operation to be able to distinguish between the ones that need to be changed and the ones that don't need this, so the pattern is a regular expression match of the operation name.

 

Attached find the current solution, which is enhanced some more.

This is a highly customized solution, so you might only use it as a blueprint.

 

The file is not a DLL, it is a VB.NET source code, so you can run it as a journal or compile it into a DLL.

More information about the problem can be found in the NX syslog.

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: NX12.0

How to Get the Most from Your Signature in the Community

Re: How do we get the parent CAM.CAMFeature of a CAM.FBM.Feature

Valued Contributor
Valued Contributor

Hello Stefan,

 

In your code, you use the following line to get the tool diameter:

theToolDiameter = theTool.GetRealValue("Tool Diameter")

I was trying to get the point length of the tool, but don't know what is the index string for it. Do you have any ideas?

 

Thanks,

Kai 

Re: How do we get the parent CAM.CAMFeature of a CAM.FBM.Feature

Esteemed Contributor
Esteemed Contributor

You can get the correct names by running the attached Journal when the object of interest is selected.

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: NX12.0

How to Get the Most from Your Signature in the Community

Re: How do we get the parent CAM.CAMFeature of a CAM.FBM.Feature

Valued Contributor
Valued Contributor

Thanks, Stephan. I selected the tool which I want to get the information of, and ran your journal. I found an attribute called "Tool Point Length". Then I used the following line to get the information:

 

theToolPointLen = theTool.GetRealValue("Tool Point Length")

 

but NX gives me the following error:

 

Mess.PNG

 

Do you have any ideas?

 

Thanks,

Kai

Re: How do we get the parent CAM.CAMFeature of a CAM.FBM.Feature

Esteemed Contributor
Esteemed Contributor

Some attributes are not accessible by their name, so you need to use the old index number and UF function wrapper instead.

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: NX12.0

How to Get the Most from Your Signature in the Community