Hello, erudite people,
I am a Japanese who has been journaling in NX for a month and a week now. I am also a beginner in programming.
・Simulation Navigator
Sim→Result
↓
・PostProcessing Navigator
Structural→Subcase - Static Loads(Z,-Z,Y,-Y,X,-X)→Stress - Element-node
Contour Plot→Post View [#]→Group→[UserGroups]
I would like to get the numerical value of the maximum principal stress and the nodes in this display area and output them with "WriteLine()", but I don't know what method to use to get the above two.
It is not nearly done yet, but we will output one piece at a time like this. (I intend to output all groups in a loop.)
' NX 1884
' Journal created by miley on Thu Jul 6 14:41:45 2023 JST
'
Imports System
Imports NXOpen
Imports NXOpenUI
Imports NXOpen.UF
Module NXJournal
Sub Main (ByVal args() As String)
Dim theSession As NXOpen.Session = NXOpen.Session.GetSession()
Dim basePart As BasePart = theSession.Parts.BaseWork
Dim workSimPart As NXOpen.CAE.SimPart = TryCast(basePart, NXOpen.CAE.SimPart)
Dim displaySimPart As NXOpen.CAE.SimPart = CType(theSession.Parts.BaseDisplay, NXOpen.CAE.SimPart)
Dim lw As ListingWindow = theSession.ListingWindow
If workSimPart Is Nothing
Dim Alert as String = "Simじゃないからできないよ"
Dim Title as String = "[ジャーナル]:エラー"
MsgBox(Alert, vbOKOnly + vbCritical, Title)
Exit Sub
End If
lw.Open
lw.WriteLine("")
lw.WriteLine("")
lw.WriteLine("")
lw.WriteLine("")
lw.WriteLine("")
lw.WriteLine("")
lw.WriteLine("")
lw.WriteLine("")
lw.WriteLine("---------------グループ毎に最大主応力とその節点を出力します.....---------------")
lw.WriteLine("")
lw.WriteLine("")
lw.WriteLine("")
Dim annotation1() As NXOpen.CAE.PostAnnotation
theSession.Post.GetAnnotations(1, annotation1)
annotation1(1).Show(True)
Dim markId1 As NXOpen.Session.UndoMarkId = Nothing
markId1 = theSession.SetUndoMark(NXOpen.Session.MarkVisibility.Visible, "開始")
Dim result1 As NXOpen.CAE.Result = Nothing
Dim resultParameters1 As NXOpen.CAE.ResultParameters = Nothing
theSession.Post.GetResultForPostview(1, result1, resultParameters1)
Dim signalProcessingDBSettings1 As NXOpen.CAE.SignalProcessingDBSettings = Nothing
signalProcessingDBSettings1 = resultParameters1.GetDbSettings()
Dim postLegend1 As NXOpen.CAE.PostLegend = Nothing
postLegend1 = theSession.Post.PostviewGetLegend(1)
theSession.SetUndoMarkName(markId1, "ポストビューダイアログ")
Dim solutionResult1 As NXOpen.CAE.SolutionResult = CType(result1, NXOpen.CAE.SolutionResult)
Dim loadcase1 As NXOpen.CAE.Loadcase = CType(solutionResult1.Find("Loadcase[1]"), NXOpen.CAE.Loadcase)
Dim iteration1 As NXOpen.CAE.Iteration = CType(loadcase1.Find("Iteration[1]"), NXOpen.CAE.Iteration)
Dim resultType1 As NXOpen.CAE.ResultType = CType(iteration1.Find("ResultType[[Stress][Element-Nodal]]"), NXOpen.CAE.ResultType)
Dim section1() As NXOpen.CAE.Result.Section
section1 = resultType1.GetSectionDefined()
Dim section2() As NXOpen.CAE.Result.Section
section2 = resultType1.GetSectionDefined()
Dim section3() As NXOpen.CAE.Result.Section
section3 = resultType1.GetSectionDefined()
Dim section4() As NXOpen.CAE.Result.Section
section4 = resultType1.GetSectionDefined()
resultParameters1.SetResultComponent(NXOpen.CAE.Result.Component.MaximumPrincipal)
Dim average1 As NXOpen.CAE.Result.Averaging = Nothing
average1.DoAveraging = True
average1.AverageAcrossPropertyIds = True
average1.AverageAcrossMaterialIds = True
average1.AverageAcrossElementTypes = True
average1.AverageAcrossFeatangle = True
average1.AverageAcrossAnglevalue = 45.0
average1.IncludeInternalElementContributions = True
resultParameters1.SetAveragingCriteria(average1)
resultParameters1.SetProjectOnNodeNormal(False)
theSession.Post.PostviewSetResult(1, resultParameters1)
Dim deformationParameters1 As NXOpen.CAE.DeformationParameters = Nothing
deformationParameters1 = theSession.ResultManager.CreateDeformationParameters()
theSession.Post.PostviewSetDeformedUndeformedSynchronization(1, False, False, True)
Dim resultType2 As NXOpen.CAE.ResultType = CType(iteration1.Find("ResultType[[Displacement][Nodal]]"), NXOpen.CAE.ResultType)
deformationParameters1.GenericType = resultType2
deformationParameters1.ComplexCriterion = NXOpen.CAE.Result.Complex.Amplitude
deformationParameters1.PhaseAngle = 0.0
deformationParameters1.DeformationType = NXOpen.CAE.Result.DeformationScale.Model
deformationParameters1.Scale = 10.0
deformationParameters1.UseShellNormalComponent = False
deformationParameters1.Component = NXOpen.CAE.Result.Component.Magnitude
deformationParameters1.IsReferenceNode = False
deformationParameters1.ReferenceNode = Nothing
deformationParameters1.InitialDeformationScaleType = NXOpen.CAE.Result.DeformationScale.Model
deformationParameters1.InitialDeformationScale = 10.0
deformationParameters1.InitialDeformationUserselectionType = NXOpen.CAE.Result.InitialDeformationSelection.None
theSession.Post.PostviewSetDeformation(1, deformationParameters1)
theSession.ResultManager.DeleteDeformationParameters(deformationParameters1)
theSession.Post.PostviewUpdate(1)
Dim results1(0) As NXOpen.CAE.Result
results1(0) = solutionResult1
Dim usergroupIds1(0) As Integer
usergroupIds1(0) = 18
theSession.Post.PostviewApplyUserGroupVisibility(1, results1, usergroupIds1, NXOpen.CAE.Post.GroupVisibility.ShowOnly)
lw.WriteLine() 'Here!!!!!!!!!!!!!!!!! Help me!!!!!!!!!!!!!!!!!!!!!!
workSimPart.ModelingViews.WorkView.Fit()
usergroupIds1(0) = 19
theSession.Post.PostviewApplyUserGroupVisibility(1, results1, usergroupIds1, NXOpen.CAE.Post.GroupVisibility.ShowOnly)
workSimPart.ModelingViews.WorkView.Fit()
usergroupIds1(0) = 20
theSession.Post.PostviewApplyUserGroupVisibility(1, results1, usergroupIds1, NXOpen.CAE.Post.GroupVisibility.ShowOnly)
workSimPart.ModelingViews.WorkView.Fit()
usergroupIds1(0) = 21
theSession.Post.PostviewApplyUserGroupVisibility(1, results1, usergroupIds1, NXOpen.CAE.Post.GroupVisibility.ShowOnly)
workSimPart.ModelingViews.WorkView.Fit()
usergroupIds1(0) = 22
theSession.Post.PostviewApplyUserGroupVisibility(1, results1, usergroupIds1, NXOpen.CAE.Post.GroupVisibility.ShowOnly)
workSimPart.ModelingViews.WorkView.Fit()
usergroupIds1(0) = 23
theSession.Post.PostviewApplyUserGroupVisibility(1, results1, usergroupIds1, NXOpen.CAE.Post.GroupVisibility.ShowOnly)
workSimPart.ModelingViews.WorkView.Fit()
usergroupIds1(0) = 24
theSession.Post.PostviewApplyUserGroupVisibility(1, results1, usergroupIds1, NXOpen.CAE.Post.GroupVisibility.ShowOnly)
workSimPart.ModelingViews.WorkView.Fit()
theSession.ResultManager.DeleteResultParameters(resultParameters1)
End Sub
End Module
Can someone please help me?
Even if you don't have an answer, tips are welcome.
Thanks to all of you.
Please excuse my poor English.
Regards,
miley
Please help me, please help me.....
I haven't gotten any ideas since then.....
Please....
miley
re: max stress
https://community.sw.siemens.com/s/question/0D54O000061xPz1SAE/nx-open-c...
According to the thread above, it looks like there are some methods in the API that will return the max stress and its location. Unfortunately, I don't have any code examples on this site. There might be some code samples on the Siemens support site.
Thank you so much!!!
You have given me some great tips!
I am now able to get the maximum value for the entire model.
' NX 1884
' Journal created by miley on Aug 2023 JST
'
Imports System
Imports NXOpen
Imports NXOpenUI
Imports NXOpen.UF
Module NXJournal
Sub Main (ByVal args() As String)
Dim theSession As NXOpen.Session = NXOpen.Session.GetSession()
Dim basePart As BasePart = theSession.Parts.BaseWork
Dim workSimPart As NXOpen.CAE.SimPart = TryCast(basePart, NXOpen.CAE.SimPart)
Dim displaySimPart As NXOpen.CAE.SimPart = CType(theSession.Parts.BaseDisplay, NXOpen.CAE.SimPart)
Dim lw As ListingWindow = theSession.ListingWindow
Dim resultManager1 As NXOpen.CAE.ResultManager = CType(theSession.ResultManager, NXOpen.CAE.ResultManager)
Dim MySimSimulation As CAE.SimSimulation = CType(workSimPart.FindObject("Simulation"), CAE.SimSimulation)
Dim SimSolution As CAE.SimSolutionCollection = MySimSimulation.Solutions
Dim SimSolutions() As CAE.SimSolution = SimSolution.ToArray
Dim solutionResult1 As NXOpen.CAE.SolutionResult = Nothing
solutionResult1 = TryCast(resultManager1.CreateSolutionResult(SimSolutions(0)),NXOpen.CAE.SolutionResult)
If workSimPart Is Nothing
Dim Alert as String = "Simじゃないからできないよ"
Dim Title as String = "[ジャーナル]:エラー"
MsgBox(Alert, vbOKOnly + vbCritical, Title)
Exit Sub
End If
If solutionResult1 Is Nothing
Dim Alert as String = "結果がないからできないよ"
Dim Title as String = "[ジャーナル]:エラー"
MsgBox(Alert, vbOKOnly + vbCritical, Title)
Exit Sub
End If
Dim results1(0) As NXOpen.CAE.Result
results1(0) = solutionResult1
Dim usergroupIds1(0) As Integer
lw.Open
lw.WriteLine("")
lw.WriteLine("")
lw.WriteLine("")
lw.WriteLine("")
lw.WriteLine("")
lw.WriteLine("")
lw.WriteLine("")
lw.WriteLine("")
lw.WriteLine("---------------表示範囲の最大主応力の数値と節点を出力します.....---------------")
lw.WriteLine("")
lw.WriteLine("")
workSimPart.ModelingViews.WorkView.Fit()
Dim simulation As CAE.SimSimulation = worksimPart.Simulation()
Dim solution As CAE.SimSolution = simulation.ActiveSolution()
Dim results As CAE.Result = GetResults(solution)
Dim resultType As CAE.Result.Type
'Dim Group1 As CAE.CaeGroup = CType(workSimPart.CaeGroups.FindObject(MyGroup), NXOpen.CAE.CaeGroup)
Dim ResultA(5) As NXOpen.CAE.ResultAccess
Dim MaxV(5) As Double
Dim MaxN(5) As Double
Dim Subcase(5) As String
Subcase = New String() {" Z","-Z","-Y"," Y","-X"," X"}
lw.WriteLine("・トップ")
For i As Integer = 0 To 5
ResultA(i) = GetResultAccessTop(results, resultType, i, 0, 1.0)
MaxV(i) = ResultA(i).AskMaximum()
'MaxN(i) = ResultA(i)
lw.WriteLine("荷重方向:" & Subcase(i) & " 「" & MaxV(i)/1000 & "」 MPa")
Next
lw.WriteLine("")
lw.WriteLine("・ボトム")
For i As Integer = 0 To 5
ResultA(i) = GetResultAccessBottom(results, resultType, i, 0, 1.0)
MaxV(i) = ResultA(i).AskMaximum()
lw.WriteLine("荷重方向:" & Subcase(i) & " 「" & MaxV(i)/1000 & "」 MPa")
Next
End Sub
Function GetResultAccessTop(ByRef results As CAE.Result, ByRef resultType As CAE.Result.Type, ByVal loadCaseIdx As Integer, ByVal iterationIdx As Integer, ByVal scale As Double) As CAE.ResultAccess
Dim theSession As NXOpen.Session = NXOpen.Session.GetSession()
Dim part As BasePart = theSession.Parts.BaseWork
Dim theResultManager As CAE.ResultManager = theSession.ResultManager()
Dim unit_stress As Unit = CType(part.UnitCollection.FindObject("MilliNewtonPerSquareMilliMeter"), Unit)
Dim resultParameter As CAE.ResultParameters = theResultManager.CreateResultParameters()
resultType.Quantity = CAE.Result.Quantity.Stress
resultType.Location = CAE.Result.Location.ElementNodal
resultType.Section = CAE.Result.Section.Top
Dim averaging As CAE.Result.Averaging
averaging.DoAveraging = True
averaging.AverageAcrossPropertyIds = True
averaging.AverageAcrossMaterialIds = True
averaging.AverageAcrossElementTypes = True
averaging.AverageAcrossFeatangle = True
averaging.AverageAcrossAnglevalue = 45.0
averaging.IncludeInternalElementContributions = True
resultParameter.SetLoadcaseIteration(loadCaseIdx, iterationIdx)
resultParameter.SetResultType(resultType)
resultParameter.SetResultComponent(CAE.Result.Component.MaximumPrincipal)
'resultParameter.SetSectionPlyLayer(0, 0, 1)
resultParameter.SetAveragingCriteria(averaging)
resultParameter.SetCoordinateSystem(CAE.Result.CoordinateSystem.AbsoluteRectangular)
resultParameter.SetElementValueCriterion(CAE.Result.ElementValueCriterion.Average)
resultParameter.SetComplexCriterion(CAE.Result.Complex.Amplitude)
resultParameter.SetPhaseAngle(0.0)
resultParameter.SetScale(scale)
resultParameter.SetUnit(unit_stress)
Dim solResultsAccess As CAE.ResultAccess = theResultManager.CreateResultAccess(results, resultParameter)
solResultsAccess.SetParameters(resultParameter)
Return solResultsAccess
End Function
Function GetResultAccessBottom(ByRef results As CAE.Result, ByRef resultType As CAE.Result.Type, ByVal loadCaseIdx As Integer, ByVal iterationIdx As Integer, ByVal scale As Double) As CAE.ResultAccess
Dim theSession As NXOpen.Session = NXOpen.Session.GetSession()
Dim part As BasePart = theSession.Parts.BaseWork
Dim theResultManager As CAE.ResultManager = theSession.ResultManager()
Dim unit_stress As Unit = CType(part.UnitCollection.FindObject("MilliNewtonPerSquareMilliMeter"), Unit)
Dim resultParameter As CAE.ResultParameters = theResultManager.CreateResultParameters()
resultType.Quantity = CAE.Result.Quantity.Stress
resultType.Location = CAE.Result.Location.ElementNodal
resultType.Section = CAE.Result.Section.bottom
Dim averaging As CAE.Result.Averaging
averaging.DoAveraging = True
averaging.AverageAcrossPropertyIds = True
averaging.AverageAcrossMaterialIds = True
averaging.AverageAcrossElementTypes = True
averaging.AverageAcrossFeatangle = True
averaging.AverageAcrossAnglevalue = 45.0
averaging.IncludeInternalElementContributions = True
resultParameter.SetLoadcaseIteration(loadCaseIdx, iterationIdx)
resultParameter.SetResultType(resultType)
resultParameter.SetResultComponent(CAE.Result.Component.MaximumPrincipal)
'resultParameter.SetSectionPlyLayer(0, 0, 1)
resultParameter.SetAveragingCriteria(averaging)
resultParameter.SetCoordinateSystem(CAE.Result.CoordinateSystem.AbsoluteRectangular)
resultParameter.SetElementValueCriterion(CAE.Result.ElementValueCriterion.Average)
resultParameter.SetComplexCriterion(CAE.Result.Complex.Amplitude)
resultParameter.SetPhaseAngle(0.0)
resultParameter.SetScale(scale)
resultParameter.SetUnit(unit_stress)
Dim solResultsAccess As CAE.ResultAccess = theResultManager.CreateResultAccess(results, resultParameter)
solResultsAccess.SetParameters(resultParameter)
Return solResultsAccess
End Function
Function GetResults(ByRef solution As CAE.SimSolution) As CAE.Result
Dim theSession As NXOpen.Session = NXOpen.Session.GetSession()
Dim results As CAE.Result = Nothing
Dim part As BasePart = theSession.Parts.BaseWork
Dim theResultManager As CAE.ResultManager = theSession.ResultManager()
Dim solresults As CAE.SolutionResult = theResultManager.CreateSolutionResult(solution)
results = CType(solresults, CAE.Result)
Return results
End Function
End Module
There are many problems with this code, but it works.
However, I do not know how to get the node number and how to get the maximum value of the model being displayed instead of the entire model.
Do you have any tips on this?;(
miley
By the way...
---------------表示範囲の最大主応力の数値と節点を出力します.....---------------
・トップ
荷重方向: Z 「21.960150390625」 MPa
荷重方向:-Z 「24.452609375」 MPa
荷重方向:-Y 「34.8372578125」 MPa
荷重方向: Y 「39.5315703125」 MPa
荷重方向:-X 「41.183203125」 MPa
荷重方向: X 「46.30506640625」 MPa
・ボトム
荷重方向: Z 「20.41991796875」 MPa
荷重方向:-Z 「25.366037109375」 MPa
荷重方向:-Y 「34.40998828125」 MPa
荷重方向: Y 「42.391609375」 MPa
荷重方向:-X 「37.70608203125」 MPa
荷重方向: X 「48.28778515625」 MPa
Here is an example of the listing window you will get when you run the above code.
I want to display the corresponding node numbers here, respectively.
miley
I want you to help me.....
I haven't gotten any ideas since then.....Please...
miley
re: max stress
I rarely work with the CAE application. I don't currently have any code samples that would help in your case. You might want to search the Siemens knowledge base for code samples. Below is one link that might be useful:
https://support.sw.siemens.com/en-US/product/209349590/knowledge-base/PL...
If you don't find any code samples to help, you might want to post your question on the Siemens forum:
https://community.sw.siemens.com/s/topic/0TO4O000000MiiWWAS/nx-customiza...
Thanks for the reply....
The link above gave me a 403 Forbidden and I could not open it, but the link below may be helpful.
I will look for clues from here, but will pose questions once I have the information together.
Thanks so much!
miley
miley
ResultAccess workshop
I have an old (NX 8 / circa 2012) workshop that steps through this process, but unfortunately, I don't see a way to post files here. In lieu of the PDF workshop documentation, I'll just post the final VB code here. Hopefully this code, and the comments within it will help.
Option Strict Off
Imports System
Imports NXOpen
Imports NXOpen.UF
Module ResultAccessPerf
' Explicit Activation
' This entry point is used to activate the application explicitly
Sub Main()
Dim theSession As Session = Session.GetSession()
Dim theUI As UI = UI.GetUI()
Dim theUfSession As UFSession = UFSession.GetUFSession()
' TODO: Add your application code here
' Define the listing window so we can write text information
Dim theLw As ListingWindow = theSession.ListingWindow
theLw.Open()
' Define the message box to report any errors
Dim theNxMessageBox As NXMessageBox = theUI.NXMessageBox
' Get the current work part
Dim basePart As BasePart = theSession.Parts.BaseWork
' Verify that it is a SIM part
Dim simPart As CAE.SimPart = TryCast(basePart, CAE.SimPart)
If simPart Is Nothing Then
theNxMessageBox.Show("NX Result Access", NXMessageBox.DialogType.Error, _
"The current work part is not a SIM part")
Return
End If
' Loop through all solutions in the SIM
For Each solution As CAE.SimSolution In simPart.Simulation.Solutions.ToArray
theLw.WriteLine("Solution: [" + solution.Name + _
"] Solver Type: [" + solution.SolverType + _
"] Solution Type: [" + solution.SolutionType + _
"] Analysis Type: [" + solution.AnalysisType + "]")
' Create a Result object for the current solution
Dim resultManager As CAE.ResultManager = theSession.ResultManager
Dim solResult As CAE.Result = resultManager.CreateSolutionResult(solution)
' Loop through all loadcases in the result
For Each loadcase As CAE.BaseLoadcase In solResult.GetLoadcases
theLw.WriteLine(vbNewLine + " Loadcase: [" + loadcase.Name + "]")
' Loop through all iterations in the loadcase
For Each iteration As CAE.BaseIteration In loadcase.GetIterations
theLw.WriteLine(" Iteration: [" + iteration.Name + _
"] Type: [" + iteration.Type.ToString + "]")
' Loop through each result type in the iteration
For Each baseResultType As CAE.BaseResultType In iteration.GetResultTypes
Dim resultType As CAE.ResultType = TryCast(baseResultType, CAE.ResultType)
theLw.WriteLine(" ResultType = [" + resultType.Name + "]")
theLw.WriteLine(" Datatype = [" + resultType.Datatype.ToString + "]")
theLw.WriteLine(" Location = [" + resultType.Location.ToString + "] ")
theLw.WriteLine(" Quatitiy = [" + resultType.Quantity.ToString + "] ")
theLw.WriteLine(" Complex = [" + resultType.Complex.ToString + "]")
theLw.WriteLine(" Title = [" + resultType.Title + "]")
theLw.WriteLine(" SubTitle = [" + resultType.Subtitle + "]")
theLw.WriteLine(" UserName = [" + resultType.UserName + "]")
' Loop through the components available for this result type
Dim components() As CAE.Result.Component = Nothing
resultType.AskComponents(components)
Dim compList As String = Nothing
For Each component As CAE.Result.Component In components
compList += " [" + component.ToString + "]"
Next component
theLw.WriteLine(" Components =" + compList)
' Loop through each section in the ResultType
' Note that sections do not exist for all result types
Dim sections() As CAE.Result.Section = resultType.GetSectionDefined
If sections.Length > 0 Then
Dim sectionList As String = Nothing
For Each section As CAE.Result.Section In resultType.GetSectionDefined
sectionList += " [" + section.ToString + "]"
Next section
theLw.WriteLine(" Sections =" + sectionList)
End If
' Get the ResultAccess object
Dim resultParam As CAE.ResultParameters = resultManager.CreateResultParameters
resultParam.SetGenericResultType(resultType)
resultParam.SetResultComponent(components(0))
resultParam.SetCoordinateSystem(CAE.Result.CoordinateSystem.AbsoluteRectangular)
Dim resultAccess As CAE.ResultAccess = resultManager.CreateResultAccess(solResult, resultParam)
' Print displacements at node 65
If resultType.Quantity = CAE.Result.Quantity.Displacement And _
resultType.Location = CAE.Result.Location.Nodal Then
' Get the index for the node label
Dim nodeIndex As Integer = solResult.AskNodeIndex(65)
' Get the result values for this node
Dim nodeValues() As Double = Nothing
resultAccess.AskNodalResultAllComponents(nodeIndex, nodeValues)
theLw.WriteLine(vbNewLine + " Node 65 Displacements:")
For i As Integer = 0 To nodeValues.Length - 1
theLw.WriteLine(" Component: [" + components(i).ToString + _
"] Value: [" + nodeValues(i).ToString + "]")
Next
End If
' Print stresses at element 25
If resultType.Quantity = CAE.Result.Quantity.Stress And _
resultType.Location = CAE.Result.Location.ElementNodal Then
Dim elementIndex As Integer = solResult.AskElementIndex(25)
Dim elemNodeIdxs() As Integer = Nothing
Dim iNumComponents As Integer
Dim elementValues() As Double = Nothing
resultAccess.AskElementNodalResultAllComponents(elementIndex, elemNodeIdxs, _
iNumComponents, elementValues)
theLw.WriteLine(vbNewLine + " Element 25 Stresses:")
For i As Integer = 0 To elemNodeIdxs.Length - 1
Dim nodeLabel As Integer = solResult.AskNodeLabel(elemNodeIdxs(i))
theLw.WriteLine(" Node: [" + nodeLabel.ToString + "]")
For j As Integer = 0 To iNumComponents - 1
Dim valueIndex As Integer = i * iNumComponents + j
theLw.WriteLine(" Component: [" + components(j).ToString + _
"] Value: [" + elementValues(valueIndex).ToString + "]")
Next j
Next i
End If
' Clean up the ResultAccess and ResultParameters objects
resultManager.DeleteResultAccess(resultAccess)
resultManager.DeleteResultParameters(resultParam)
theLw.WriteLine(vbNewLine)
Next baseResultType
Next iteration
Next loadcase
' Clean up the Result object
resultManager.DeleteResult(solResult)
Next solution
End Sub
Public Function GetUnloadOption(ByVal dummy As String) As Integer
'Unloads the image immediately after execution within NX
GetUnloadOption = NXOpen.Session.LibraryUnloadOption.Immediately
'----Other unload options-------
'Unloads the image when the NX session terminates
'GetUnloadOption = NXOpen.Session.LibraryUnloadOption.AtTermination
'Unloads the image explicitly, via an unload dialog
'GetUnloadOption = NXOpen.Session.LibraryUnloadOption.Explicitly
'-------------------------------
End Function
End Module
It will be very helpful. Thank you so much!
The PDF is interesting .....
That said, thank you for the samples that seem to be very helpful in completing my desired code!
I will make use of these and hope to fulfill it somehow.
miley