Showing results for 
Search instead for 
Do you mean 
Reply

How to find the actioned Postprocess name and location within a CAM session

Hello World,

I've been struggling with a check I'm trying to perform when a user performs a PostProcessing action within CAM for some time now and after hitting a few brick walls I'm hoping that someone can offer some inspiration

 

What I'm trying to do is check the name and location of the postprocesor selected and actioned within  the CAM API. This can be either a "browsed post" or an offering already contained within the template. The reason for this is that we're trying to flag when a post is being run from an unofficial location e.g. users memory stick.

 

I first tried to use a USER_EXIT, but it appears that the event to identify a postprocessor call is only for the Siemens legacy postprocessing application. So I guess I need to put a Pre or Post action on the Postprocessing menu item.

 

Going down this approach I'm still struggling to find an API that gives me what I need.

 

theUFSession.Cam.OptAskPostNames(NoOfEntry, PostNames) - will give me a list of post names displayed in the postprocess dialogue but I really need the location of these files.

 

workPart.CAMSetup.Postprocess() - will perform the action of postprocessing by using a identified postprocessor, but again the supplied information is what I'm after.

 

I would appreciate if anyone has got any ideas

 

 

Many Thanks

 

JSON

 

18 REPLIES

Re: How to find the actioned Postprocess name and location within a CAM session

Why not replace the standard dialog with a custom one, that only offers your posts?

 

You just need to create an application specific menu file for manufacturing that contains something like the following:

 

BUTTON  UG_CAM_ONT_OUT_MACHINE_DATA
ACTIONS ${UGII_INITIAL_JOURNAL_DIR}\${UGII_VERSION}\CAM_Post_Multi.dll

 

This replaces the postprocessor dialog with a simplified one for our shop floor users, where I control what posts are displayed.

 

So the user gets my dialog for any postprocessing action, despite of where he selects it (tool bar, context menu, menu, etc.).

Stefan Pendl, Systemmanager CAx, HAIDLMAIR GmbH
Production: NX10.0.3, VERICUT 8.0, FBM, MRL 3.1.4 | TcUA 10.1 MP7 Patch 0 (10.1.7.0) | TcVis 10.1
Development: VB.NET, Tcl/Tk    Testing: NX11.0 EAP, NX12.0 EAP

How to Get the Most from Your Signature in the Community

Re: How to find the actioned Postprocess name and location within a CAM session

Have you thought about catching it in the post?

Maybe source something from the base tcl file?

Mark Rief
Retired Siemens

Re: How to find the actioned Postprocess name and location within a CAM session

Hi Mark,

Thanks for your suggestion. What we are trying to do is identify if a post is being run from "an approved" location. We're finding contractors/clever users are browsing to unofficial posts from unknown sources which could reside on memory sticks, C Drive etc. instead of using "approved posts" .

 

We could include a procedure in the official posts, but this obviously wouldn't be present in "unapproved posts"

 

I guess also with a basic knowledge of tcl this could be turned off by manually editing the .tcl file (we don't provide access to the postbuilder application or .pui file)

 

Thanks again

Re: How to find the actioned Postprocess name and location within a CAM session

Thank for the idea Stefan,
The only downside I can see with this approach, is that if Siemens update their dialogue e.g. add the ability to enable debugging etc. this obviously wouldn’t be available. Also will CAM Data manager still function e.g. the ability to save MCD to TC as apart of the save process?


Thank again for your response

Re: How to find the actioned Postprocess name and location within a CAM session

The functionality of the export folder will not break, you just have to save the nc file there.

 

I think the new API method to postprocess also supports the setting of the debug features.

 

The dialog would just block the ability to select foreign posts.

Stefan Pendl, Systemmanager CAx, HAIDLMAIR GmbH
Production: NX10.0.3, VERICUT 8.0, FBM, MRL 3.1.4 | TcUA 10.1 MP7 Patch 0 (10.1.7.0) | TcVis 10.1
Development: VB.NET, Tcl/Tk    Testing: NX11.0 EAP, NX12.0 EAP

How to Get the Most from Your Signature in the Community

Re: How to find the actioned Postprocess name and location within a CAM session


MrJSON wrote:

 

Thanks for your suggestion. What we are trying to do is identify if a post is being run from "an approved" location. We're finding contractors/clever users are browsing to unofficial posts from unknown sources which could reside on memory sticks, C Drive etc. instead of using "approved posts" .

 

We could include a procedure in the official posts, but this obviously wouldn't be present in "unapproved posts"

 


I was thinking that if you have ugii_post_dir locked up, you (an admin) could put something in ugpost_base.tcl, which is read at runtime.

 

It may be parsed when the post list is built for the dialog, which is before a post is selected, but I am not sure about that. You could add a check in one of the common procs that is used by all the posts. I suspect a clever user could still find a way around it, but it may be worth looking at.

Mark Rief
Retired Siemens

Re: How to find the actioned Postprocess name and location within a CAM session

Mark

Thanks for clarifying that, I didn’t think of taking that approach. The only downside I can think of is that we would need to edit the out the box file to source in our custom command. In the past we’re tried to keep these vanilla to ease upgrading.

 

Do you know if there is anything already built in that is able to source a custom file if it exists?

 

Thanks again for your idea

 

JSON

Re: How to find the actioned Postprocess name and location within a CAM session

Mark Hi

Are you familiar with this file. "pb_base.tcl" it appears to be sources within ugpost_base.tcl. i guess we could create this without making changes to the supplied files.

 

catch {source [MOM_ask_env_var UGII_CAM_POST_DIR]pb_base.tcl}

 

Many thanks

 

Re: How to find the actioned Postprocess name and location within a CAM session

Beginning in NX 8.5, all you need to do is create a file ugpost_base_custom.tcl and it will be sourced.

 

# Customer can provide additional elements for NX/Post.
#
#   This file allows the users to provide their own handlers or custom commands
#   that can be shared by the posts of their site.
#
#   This file should be placed in the $UGII_CAM_POST_DIR directory.
#   This file will not be delivered as part of the NX release.
#   The customer is responsible for the maintenance and migration of this file.
#
if [file exists [MOM_ask_env_var UGII_CAM_POST_DIR]ugpost_base_custom.tcl] {
   source [MOM_ask_env_var UGII_CAM_POST_DIR]ugpost_base_custom.tcl
}

 

Mark Rief
Retired Siemens

Learn online





Solution Information