Showing results for 
Search instead for 
Do you mean 
Reply
Solved! Go to solution

How to disable "Create New Component" dialog by creating an assembly component.

[ Edited ]

Hello,

 

 there are configuration posibility to disable/ run in background  "Create New Component" dialog by creating a new assembly component.

Untitled.jpg

1 REPLY
Solution
Solution
Accepted by topic author agherla
‎11-29-2016 06:53 AM

Re: How to disable "Create New Component" dialog by creating an assembly component.

Hello Agherla,

 

I am not sure what exactly you would lke to do.

 

NX does provide a mechanism to hide menu items / button using menuscript using the "Hide" directive.

 

https://docs.plm.automation.siemens.com/tdoc/nx/10/nx_api/#uid:index_menuscript:exercises_exercise_i...

 

NX provides the ability to replace the default behavior for some operations with customer authored alternatives using NXOpen - Create component is supported.

 

https://docs.plm.automation.siemens.com/tdoc/nx/10/nx_api/#uid:user_exits

 

Function

 Environment Variable

Description

Create Component

 USER_CCOMP

 The create component user exit occurs after the Assemblies tab→Component group→Create New→Add Object Methods menu and before the select part dialog.

The next interactive step is determined by the return code as follows:

Return Code/Description

1.     Cancel current assembly operation

2.     Select Part dialog with the string (from string parameter) as the default. Note: The full pathname must be specified in the string parameter argument in order for this to work.

3.     Reserved for future use

n Select Part dialog with no default string. "n" is any other return code except 1, 2 or 3.

 

One implementation could be for your custom code to perform the add component operation and set a return a value of "1" to prevent the dialog for component naming from being displayed.

 

And ,there is a command line utitily to create assemblies "%UGII_BASE_DIR%\ugii\ug_assy_build.exe"  (NX11 uses nxbin directory instead of ugii).

 

Hope this helps,

Joe