×
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 Update all drawings

Journal Update all drawings

Journal Update all drawings

(OP)
Cowski,

I'd like to change the code beneath. So when I run the journal all drawing and drawing views are updated.
Can you tell mee how to do this?



ub Main (ByVal args() As String)

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

Dim displayPart As NXOpen.Part = theSession.Parts.Display

Dim markId1 As NXOpen.Session.UndoMarkId = Nothing
markId1 = theSession.SetUndoMark(NXOpen.Session.MarkVisibility.Visible, "Update Views")

Dim views1(1) As NXOpen.Drawings.DraftingView
Dim projectedView1 As NXOpen.Drawings.ProjectedView = CType(workPart.DraftingViews.FindObject("ORTHO@2"), NXOpen.Drawings.ProjectedView)

views1(0) = projectedView1
Dim baseView1 As NXOpen.Drawings.BaseView = CType(workPart.DraftingViews.FindObject("Front@1"), NXOpen.Drawings.BaseView)

views1(1) = baseView1
workPart.DraftingViews.UpdateViews(views1)

' ----------------------------------------------
' Menu: Edit->View->Update...
' ----------------------------------------------
Dim markId2 As NXOpen.Session.UndoMarkId = Nothing
markId2 = theSession.SetUndoMark(NXOpen.Session.MarkVisibility.Visible, "Start")

Dim updateViewsBuilder1 As NXOpen.Drawings.UpdateViewsBuilder = Nothing
updateViewsBuilder1 = workPart.DraftingViews.CreateUpdateViewsBuilder()

theSession.SetUndoMarkName(markId2, "Update Views Dialog")

updateViewsBuilder1.Destroy()

theSession.UndoToMark(markId2, Nothing)

theSession.DeleteUndoMark(markId2, Nothing)

Lars
NX11.0.2.7 native
Solid Edge
Inventor

RE: Journal Update all drawings

The .UpdateViews method has various options to update all the views, only the out of date views, or only the specified views. Check out the help file on .UpdateViews, it probably has an option that will work for your needs.

www.nxjournaling.com

RE: Journal Update all drawings

(OP)
ok thnx

Lars
NX11.0.2.7 native
Solid Edge
Inventor

RE: Journal Update all drawings

(OP)
Cowski,

Where can I find this file on UpdateViews?

Lars

Lars
NX11.0.2.7 native
Solid Edge
Inventor

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