PDF Journal VB Script Problems
PDF Journal VB Script Problems
(OP)
Hello,
I'm having an issue in modifying the export PDF journal a buddy of mine found on here, and I'm running into some issues. What I'm trying to do is add a save function into it, so that after it updates the views and exports the PDF, it saves the assembly.
I attached the file.
Basically, it does what I want it to already, but I don't want to have to use SendKeys to save. Does anyone here know how to save directly? What is the function?
Any help would be greatly appreciated!
I'm having an issue in modifying the export PDF journal a buddy of mine found on here, and I'm running into some issues. What I'm trying to do is add a save function into it, so that after it updates the views and exports the PDF, it saves the assembly.
I attached the file.
Basically, it does what I want it to already, but I don't want to have to use SendKeys to save. Does anyone here know how to save directly? What is the function?
Any help would be greatly appreciated!





RE: PDF Journal VB Script Problems
CODE
partSaveStatus1 = workPart.Save(BasePart.SaveComponents.True, BasePart.CloseAfterSave.False)
partSaveStatus1.Dispose()
These lines of code will save the work part along with any components that you have write access to, and it will leave the file open after the save operation. You can change these options by modifying the True/False values as necessary.
www.nxjournaling.com
RE: PDF Journal VB Script Problems
Thanks for your help!
RE: PDF Journal VB Script Problems
The problem is, it's not working. What am I doing wrong?
Any help would be awesome!!
RE: PDF Journal VB Script Problems
www.nxjournaling.com
RE: PDF Journal VB Script Problems
Thanks!
RE: PDF Journal VB Script Problems
www.nxjournaling.com
RE: PDF Journal VB Script Problems
CODE --> VBA
' NX 7.5.4.4 ' Journal created by kevin.wegner on Thu Jun 28 08:47:01 2012 Eastern Daylight Time ' Option Strict Off Imports System Imports NXOpen Module NXJournal Sub Main Dim theSession As Session = Session.GetSession() Dim workPart As Part = theSession.Parts.Work Dim displayPart As Part = theSession.Parts.Display Dim validators1() As Validate.Validator theSession.ValidationManager.FindValidator("Check-Mate", validators1) validators1(0).ClearPartNodes() Dim validators2() As Validate.Validator theSession.ValidationManager.FindValidator("Check-Mate", validators2) validators1(0).AppendPartNode("workPart.FullPath.") Dim validators3() As Validate.Validator theSession.ValidationManager.FindValidator("Check-Mate", validators3) Dim validatorOptions1 As Validate.ValidatorOptions validatorOptions1 = validators1(0).ValidatorOptions Dim validators4() As Validate.Validator theSession.ValidationManager.FindValidator("Check-Mate", validators4) Dim status1 As Validation.Result status1 = validators1(0).Commit() Dim parsers1() As Validate.Parser theSession.ValidationManager.FindParser("Validation Gadget", parsers1) parsers1(0).ClearResultObjects() parsers1(0).DataSource = Validate.Parser.DataSourceTypes.MostRecentRun parsers1(0).MaxDisplayObjects = 25 Dim parsers2() As Validate.Parser theSession.ValidationManager.FindParser("Validation Gadget", parsers2) parsers1(0).Commit() End Sub End ModuleRE: PDF Journal VB Script Problems
RE: PDF Journal VB Script Problems
CODE
www.nxjournaling.com
RE: PDF Journal VB Script Problems
RE: PDF Journal VB Script Problems
www.nxjournaling.com
RE: PDF Journal VB Script Problems
www.nxjournaling.com