×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Journal to import part file in Team Center

Journal to import part file in Team Center

Journal to import part file in Team Center

(OP)
I have a journal to import part files in NX with all the notes we need. These even work in Team Center, importing from OS.

Whats the secret to importing another TC file into a TC file?

Also, is it hard to make it so one can select a position (Cursor point) to import the file instead of coming in at absolute?

Ken
www.OneGodLogic.com
My brain is like a sponge. A sopping wet sponge. When I use it, I seem to lose more than I soak in.

RE: Journal to import part file in Team Center

I think you will have to give more detail of what you are trying to do.
In Teamcenter you may want to check out
File -> New -> Dataset

Jerry J.
UGV5-NX1884

RE: Journal to import part file in Team Center

(OP)
I have the following code that seems to work in NX and TC. It imports a file from the OS into the file you are currently in. We do this to have a group of specific notes in that file. We hit a button and it automatically places them in the drawing on drafting for us.

I would like to do the same thing while in a TC file, but I need to import another TC file and I need it to allow the user to pick a place in the screen for the file to land rather than just come in automatically at Zero.

One other important note. This will be used while expanded into a view if that makes a difference.

CODE -->

Option Strict Off
Imports System
Imports NXOpen

Module NXJournal
Sub Main (ByVal args() As String) 

Dim theSession As Session = Session.GetSession()
Dim workPart As Part = theSession.Parts.Work
Dim displayPart As Part = theSession.Parts.Display

' ----------------------------------------------
'   Menu: File->Import->Part...
' ----------------------------------------------
Dim markId1 As Session.UndoMarkId
markId1 = theSession.SetUndoMark(Session.MarkVisibility.Visible, "Import Part")

        workPart.Layers.WorkLayer = 253

        Dim partImporter1 As PartImporter
partImporter1 = workPart.ImportManager.CreatePartImporter()

partImporter1.FileName = "R:\hms_tools\NX1872\Tooling\part\Notes\View_Z.prt"

partImporter1.Scale = 1.0

partImporter1.CreateNamedGroup = False

partImporter1.ImportViews = False

partImporter1.ImportCamObjects = False

partImporter1.LayerOption = PartImporter.LayerOptionType.Work

partImporter1.DestinationCoordinateSystemSpecification = PartImporter.DestinationCoordinateSystemSpecificationType.Work

Dim element1 As Matrix3x3
element1.Xx = 1.0
element1.Xy = 0.0
element1.Xz = 0.0
element1.Yx = 0.0
element1.Yy = 1.0
element1.Yz = 0.0
element1.Zx = 0.0
element1.Zy = 0.0
element1.Zz = 1.0
Dim nXMatrix1 As NXMatrix
nXMatrix1 = workPart.NXMatrices.Create(element1)

partImporter1.DestinationCoordinateSystem = nXMatrix1

Dim destinationPoint1 As Point3d = New Point3d(0.0, 0.0, 0.0)
partImporter1.DestinationPoint = destinationPoint1

Dim markId2 As Session.UndoMarkId
markId2 = theSession.SetUndoMark(Session.MarkVisibility.Invisible, "Import Part Commit")

Dim nXObject1 As NXObject
nXObject1 = partImporter1.Commit()

theSession.DeleteUndoMark(markId2, Nothing)

partImporter1.Destroy()

' ----------------------------------------------
'   Menu: Tools->Journal->Stop Recording
' ----------------------------------------------

End Sub
End Module 

Ken
www.OneGodLogic.com
My brain is like a sponge. A sopping wet sponge. When I use it, I seem to lose more than I soak in.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members! Already a Member? Login


Resources

Low-Volume Rapid Injection Molding With 3D Printed Molds
Learn methods and guidelines for using stereolithography (SLA) 3D printed molds in the injection molding process to lower costs and lead time. Discover how this hybrid manufacturing process enables on-demand mold fabrication to quickly produce small batches of thermoplastic parts. Download Now
Design for Additive Manufacturing (DfAM)
Examine how the principles of DfAM upend many of the long-standing rules around manufacturability - allowing engineers and designers to place a part’s function at the center of their design considerations. Download Now
Taking Control of Engineering Documents
This ebook covers tips for creating and managing workflows, security best practices and protection of intellectual property, Cloud vs. on-premise software solutions, CAD file management, compliance, and more. Download Now

Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close