Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

NXOpen for Slot

Status
Not open for further replies.

EngProgrammer

Aerospace
Jan 14, 2015
150
0
0
US
I am trying to create an NXOpen program for creating slots within a block. After journaling the creation of a slot there is nothing in the journal file. I knew this would be the case since there weren't any green dots next to the slot feature.

Any ideas?
 
Replies continue below

Recommended for you

Are you searching in the net_ref.chm document?

Using the NX 9 version of the document, searching for *slot* yields 77 results including:
CreateBallSlot
CreateDoveTailSlot
CreateRectSlot
CreateTSlot
CreateUSlot

www.nxjournaling.com
 
Hi Cowski,

I found it. Thank you.

Having a few issues. I am putting the slot into an block I created using: ufs.Modl.CreateBlock1(sign, corner_pt, edge_lengths, block_feat_tag).

Now that I have the block created, I need to get the face tags of the upper and lower faces of the block.

How do I get the faces and tags of the block?

Regards
 
Why not use the BlockFeatureBuilder to create the block and then get the faces of the block using its getFaces() method?

Graham Inchley, Systems Developer, Sandvik Coromant. HP EliteBook 8760w, Win7, 16GB. Developing in: Java | C | C# | KF
Production: NX8.5.3.3 MP4 64bit
Testing: NX9.0.2.5
 
Doesn't matter which method I use. I don't have a problem getting the faces of the block. My problem lies with getting the tags of those faces.

 
Every TaggedObject has a method tag() that returns the... tag.

Graham Inchley, Systems Developer, Sandvik Coromant. HP EliteBook 8760w, Win7, 16GB. Developing in: Java | C | C# | KF
Production: NX8.5.3.3 MP4 64bit
Testing: NX9.0.2.5
 
I've managed to get something working for cutting a rectangular slot within a solid block. However, the slot is slicing the in two pieces. I assinged the top face tag to the "RPO Contraints"

Here's the snippet of code:

Dim loc(2) As Double
loc(0) = iOrigin.X
loc(1) = iOrigin.Y
loc(2) = iOrigin.Z

Dim tool_axis(2) As Double
tool_axis(0) = iAxis.X
tool_axis(1) = iAxis.Y
tool_axis(2) = iAxis.Z

Dim directon(2) As Double
directon(0) = iDirection.X
directon(1) = iDirection.Y
directon(2) = iDirection.Z


Dim features As NXOpen.Tag
features = Nothing

theUFSession.Modl.CreateRectSlot(loc, tool_axis, directon, Width.ToString(), Depth.ToString(), Length.ToString(), TopFace.Tag, TopFace.Tag, BtmFace.Tag, features)


Dim featName As String = Nothing
theUFSession.Modl.AskFeatName(features, featName)

Dim bodyFeature1 As Features.BodyFeature = CType(workpart.Features.FindObject(featName), Features.BodyFeature)

Return bodyFeature1
 
Status
Not open for further replies.
Back
Top