Using ug_inspect to check if flat pattern entity exist in a part
Using ug_inspect to check if flat pattern entity exist in a part
(OP)
Hi,
Is it possible to use ug_inspect to check if flat pattern entity exist in a part ?
If not:
Is it possible to use ug_inspect to check if a special layer is not empty ?
Thanks in advance
Is it possible to use ug_inspect to check if flat pattern entity exist in a part ?
If not:
Is it possible to use ug_inspect to check if a special layer is not empty ?
Thanks in advance
Regards
Didier Psaltopoulos
http://www.psi-cad.fr





RE: Using ug_inspect to check if flat pattern entity exist in a part
However, a journal could be made to do either (or both) of the tasks that you mentioned...
www.nxjournaling.com
RE: Using ug_inspect to check if flat pattern entity exist in a part
Unfortunatly, I am not an expert in vb :(
Regards
Didier Psaltopoulos
http://www.psi-cad.fr
RE: Using ug_inspect to check if flat pattern entity exist in a part
CODE
Option Strict Off Imports System Imports NXOpen Module Module1 Sub Main() Dim theSession As Session = Session.GetSession() If IsNothing(theSession.Parts.BaseWork) Then 'active part required Return End If Dim workPart As Part = theSession.Parts.Work Dim lw As ListingWindow = theSession.ListingWindow lw.Open() Const undoMarkName As String = "check for flat pattern" Dim markId1 As Session.UndoMarkId markId1 = theSession.SetUndoMark(Session.MarkVisibility.Visible, undoMarkName) Dim fpFound As Boolean = False For Each tempFeature As Features.Feature In workPart.Features If TypeOf (tempFeature) Is Features.FlatPattern Then fpFound = True lw.WriteLine("workpart contains flat pattern") End If Next If Not fpFound Then lw.WriteLine("workpart does NOT contain a flat pattern") End If lw.Close() End Sub Public Function GetUnloadOption(ByVal dummy As String) As Integer 'Unloads the image immediately after execution within NX GetUnloadOption = NXOpen.Session.LibraryUnloadOption.Immediately End Function End Modulewww.nxjournaling.com
RE: Using ug_inspect to check if flat pattern entity exist in a part
Cheers,
NXJockey
#! NX/KF 3.0
#
DefClass: check_for_flat_pattern ( %ug_base_checker );
( String ) %test_category: "MyCustomChecks.Modelling";
( String ) %displayed_name: "Check For Flat Pattern";
( Boolean Parameter ) Disabled?: False;
( Boolean Parameter ) save_log_in_part: False;
# Attributes for this class
( List Modifiable ) flat_ptrn: mqc_askObjectOfType( True, 64, 7, "lib", "libufmqc", "Name", "mqc_ufkf_askObjectOfType" );
# Checker function
(Any Uncached) do_check:
If ( (-Empty?(flat_ptrn:)) )
Then (mqc_log( LOG_INFO, flat_ptrn:, "Part contains a flat pattern"))
Else (donothing);
RE: Using ug_inspect to check if flat pattern entity exist in a part
Regards
Didier Psaltopoulos
http://www.psi-cad.fr
RE: Using ug_inspect to check if flat pattern entity exist in a part
Thanks for your help, but I have the following error message:
Regards
Didier Psaltopoulos
http://www.psi-cad.fr
RE: Using ug_inspect to check if flat pattern entity exist in a part
Cheers,
NXJockey
RE: Using ug_inspect to check if flat pattern entity exist in a part
I have set up my own dfa directory, but where is my test ?
Thanks in advance
Regards
Didier Psaltopoulos
http://www.psi-cad.fr
RE: Using ug_inspect to check if flat pattern entity exist in a part
Could you change the journal to check all parts in the opening assembly ?
Thanks in advance
Regards
Didier Psaltopoulos
http://www.psi-cad.fr
RE: Using ug_inspect to check if flat pattern entity exist in a part
The checkmate directory is listed in the ugii_env.dat. It's this dir which controls the checkmate profiles
Cheers
NXJockey
RE: Using ug_inspect to check if flat pattern entity exist in a part
1.) CREATE A FOLDER CALLED 'checkmate'
2.) CREATE A SUB FOLDER WITHIN THE CHECKMATE FOLDER CALLED 'DFA'
3.) STORE THE FILE IN THE DFA FOLDER
4.) CREATE A LOCAL ENVIROMENT VARIABLE:-
UGCHECKMATE_USER_DIR=**** YOUR PATH TO THE FOLDER ****\checkmate\DFA
5.) START NX
Cheers,
NXJockey
RE: Using ug_inspect to check if flat pattern entity exist in a part
I was on another subject for few days and I come back to day to this one to thank you. I succeed.
Now I will start a new thread because the tittle of this one is not adapted.
Regards
Didier Psaltopoulos
http://www.psi-cad.fr