Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Perform Analysis with Journal

Status
Not open for further replies.

Leon1975

Industrial
Joined
Aug 13, 2012
Messages
8
Location
AT
I want to check a dynamic assembly with the clearance check.

I use the journal with VB to modify some expression in a loop to run trough the diffrent positions of the assembly. For each position i want to run the Assembly clearance check.

How can i run the "Perform Analysis" in the Journal ?
Unfortunately it is not recorded by the journaling....

thanks
Leon
 
After checking the documentation i added the following lines:
Dim partTag As NXOpen.Tag
Dim Clearance1 As NXOpen.UF.UFClear

' Perform Analysis of Clearance Check
Clearance1.DoClearanceAnalysis(partTag)

but i get the message that Clearance1 is used wihrouth having a value..... what i need to define furher ?

best regards
leon
 
Hi,
it is already solved. Part of thge code is:

' Collissioncheck Perform Analysis
Try
theUfSession.Clear.FindDataset(workPart.Tag, toFind, fDataset)
Catch ex As Exception
fDataset = Tag.Null
End Try


If (fDataset <> Tag.Null) Then
Dim fdsName As String = ""
theUfSession.Clear.AskDatasetName(fDataset, fdsName)
' writer.WriteLine("Running in Find Mode: " + fdsName)

Try 'Funktion hat keinen Rückgabewerte
theUfSession.Clear.DoClearanceAnalysis(fDataset)
theUfSession.Clear.AskResults(fDataset, summary)
'theUfSession.Ui.DisplayMessage("" + summary.new_n_hard.ToString(), 1)


' If Collission found write to report

ClearanceResult=summary.new_n_hard.ToString()
If ClearanceResult <>"0" then
Textline= "Circumference Position:;" & counter1 &"°"& ";Tilting Position:;" & counter2 &"°;"& ClearanceResult & "; Hard Collissions found" & vbcrlf
My.Computer.FileSystem.WriteAllText(filePath, Textline, True)
End If

Catch ex As Exception
theUfSession.Ui.DisplayMessage("Error detected",1)
End Try
Else
theUfSession.Ui.DisplayMessage("Dataset " + toFind + " not found",1)
End If

Main Problem was, that the finddataset methode does not find the clearance set if the clearnce set is set to "component". If it is set to "body" it works.....already acknowldged by GTAC.

best regards
Leon
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top