×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

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!
  • Students Click Here

*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

Jobs

Journal Help: select all datum coordinate systems

Journal Help: select all datum coordinate systems

Journal Help: select all datum coordinate systems

(OP)
Hi all,

I am trying to journal the HORRIFICALLY DIFFICULT task of replacing our old NX6 title blocks with our new NX9 title blocks while keeping links to part attributes in the master model alive. (Siemens need to make this easier!!!! Like add a feature to select a new template in "edit sheet", but I digress) When importing our new drawing template into our old drawings it creates a Datum coordinate systems in the drawing file. In the journal I select the datums and delete them. The trouble comes when an old file has previous entities in its history and the Datum created isn't DATUM_CSYS(1) but is DATUM_CSYS(2) or DATUM_CSYS(3). The journal errors out and says it can't find the object. I need a solution to either skip to end of program and write a message to the user to delete the datums by hand, or a way to select all datum_csys in the drawing no matter how many there are or what they are named in the journal. I was attempting to use IF THEN to skip to the end of the program but the journal would always error out on the "Dim datumCsys1 As Features.DatumCsys = CType(workPart.Features.FindObject("DATUM_CSYS(1)"), Features.DatumCsys)" line saying object not found.

' ----------------------------------------------
' Menu: Edit->Delete...
' ----------------------------------------------

Dim notifyOnDelete7 As Boolean
notifyOnDelete7 = theSession.Preferences.Modeling.NotifyOnDelete

theSession.UpdateManager.ClearErrorList()

Dim markId60 As Session.UndoMarkId
markId60 = theSession.SetUndoMark(Session.MarkVisibility.Visible, "Delete")

Dim objects4(0) As NXObject
Dim datumCsys1 As Features.DatumCsys = CType(workPart.Features.FindObject("DATUM_CSYS(1)"), Features.DatumCsys)

objects4(0) = datumCsys1
Dim nErrs7 As Integer
nErrs7 = theSession.UpdateManager.AddToDeleteList(objects4)

Dim notifyOnDelete8 As Boolean
notifyOnDelete8 = theSession.Preferences.Modeling.NotifyOnDelete

Dim nErrs8 As Integer
nErrs8 = theSession.UpdateManager.DoUpdate(markId60)

' ----------------------------------------------
' Menu: Edit->Delete...
' ----------------------------------------------

RE: Journal Help: select all datum coordinate systems

Is there a datum csys in your new drawing template file? If so, delete the datum csys and save the file.

www.nxjournaling.com

RE: Journal Help: select all datum coordinate systems

(OP)
Ok... that worked. A simple solution for one of the 7 steps needed to replace our title blocks. Thank you. That said I would still like to pose the question WHY is it a 6 step process (was 7)!! And yes importing the new file into the old one works great only if you are not using part attributes from the master model and the new "title block" feature. During import you lose the link to the part attributes and even system attributes like sheet 1 of 1. The "smart" NX9 title block becomes dumb, so I have to create the drafting attribute templates in the old file, import a file with only the tables of the title block with out defining them as a title block, insert a new sheet (this now creates the link to the master model part attributes), delete the sheet I just made, run a part cleanup to make sure all attribute links are refreshed (because they all don't update), define the title block and delete extra lines that are made along the sheet border during import. This is very painful for a standard task that engineering departments have to perform regularly for various reasons. i.e. New company logo or address, new engineer department standards, new versions of the software, etc.

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!


Resources