2.3.7.9.1. Procedure when using NX without PDM

Make sure that the correct macro template is active in ifugnx.cfg and carry out a placement with a test part. Ideally, all settings of the template are already as you actually need them. In this case, there is no need to make any adjustments.

Otherwise perform the steps of the following instruction.

  1. Open an empty NX session.

  2. Select "Model" or "Assembly".

  3. Make sure that "Solid layer (default 27)" is activated.

    Menu -> Format -> Layer Settings

    Menu -> Format -> Layer Settings

    Layer 27 activated

    Layer 27 activated

  4. Carry out a test placement and you should not make any errors when recording the macro.

  5. Open a new model.

  6. Start macro recording.

    Menu -> Tools -> Macro -> Start Record...

    Menu -> Tools -> Macro -> Start Record...

    Specify the storage location and file name for the macro and confirm with OK. It is best to save the macro immediately in the directory provided for this purpose at ...\iface\unigraphics\shared\macro\cns_place_....macro.

    Macro Record" dialog

    Macro Record" dialog

    -> Recording is started immediately.

    [Note]Note

    Every keystroke is crucial! If an error occurs, please cancel the recording and restart completely!

    1. Click on Add Component.

      -> The Add Component dialog opens.

    2. Click on Reset.

    3. Click on the Open button.

      -> The Part Name dialog box opens.

      Select any part (not assembly).

      Select part

      Select part

    4. Open the list field under Assembly Location and select Absolute - Work Part.

    5. Optional: Change the setting under Placement from "Move " to "Constrain ".

    6. Optional: Deactivate the Preview option under Settings -> Interaction Options and activate Preview Window

      "Preview Window" activated

      "Preview Window" activated

    7. Finally, do NOT click OK.

  7. Finish the macro recording.

  8. Check the macro:

    1. Under Menu -> Tools -> Macro, click on Playback....

      Menu -> Tools -> Macro -> Playback...

      Menu -> Tools -> Macro -> Playback...

    2. Select the previously created macro in the Macro Playback dialog box.

      Menu -> Tools -> Macro -> Playback...

      Menu -> Tools -> Macro -> Playback...

    Only continue if everything has gone according to plan up to this point.

  9. Edit macro.

    For the macro recording a concrete sample part had been used. Places containing references to this part have to be replaced by common place holders now.

    1. Open the recorded macro.

    2. If you like replace your username by "administrator", for example. (Doesn't matter for functionality.)

    3. Search the place with FILE_BOX and MULTI_SELECT (at the end of macro)

      FILE_BOX -2,@@@D:\cadenas\partsolutions\data\pool\ugnx\16212479780_3211281_
       Supplier dependence.prt@@@
      D:\cadenas\partsolutions\data\pool\ugnx\*.prt@@@ 0 ! Part Name
         MULTI_SELECT: D:\cadenas\partsolutions\data\pool\ugnx\16212479780_3211281_
       Supplier dependence.prt

      and replace these two lines by the following:

      FILE_BOX -2,@@@<<CNS_FILENAME>>@@@<<CNS_DIRNAME>>*.PRT@@@ 0 ! Part Name
         MULTI_SELECT: <<CNS_FILENAME>> 

    4. Shortly below the just edited line you can find the file name of the part used for the macro recording.

      Example:

      ASK_ITEM 71172097 (1 STRN 0) = "16212479780_3211281_SUPPLIER DEPENDENCE"  ! 
       Component Name

      Delete the file name, meaning the entry between the quotation marks and leave the quotation marks themselves.

      ASK_ITEM 71172097 (1 STRN 0) = ""  ! Component Name

    5. Optionally, you can also delete the following lines at the end of the file.

      WINDOW RESIZE 1.000000 10.822917 7.906250 -1.000000 -0.730510 1.000000 0.730510
      WINDOW RESIZE 1.000000 10.822917 7.906250 -1.000000 -0.730510 1.000000 0.730510
      WINDOW RESIZE 1.000000 10.822917 7.906250 -1.000000 -0.730510 1.000000 0.730510
      WINDOW RESIZE 1.000000 10.822917 7.906250 -1.000000 -0.730510 1.000000 0.730510
      WINDOW RESIZE 1.000000 10.822917 7.906250 -1.000000 -0.730510 1.000000 0.730510

  10. Set placement macro in ifugnx.cfg

    [Note]Note

    This step must be carried out manually including NX version 1926, for later versions it takes place automatically, so that manual intervention at this point can be omitted, unless the macro is recorded for a special NX sub-version.

    No name adjustment is required for later versions. Simply save the recorded macro file at ...\iface\unigraphics\shared\macrousing the pattern cns_place_nxXXXX.macroor cns_place_nxXXXX_teamcenter.macro. The appropriate file will then be determined automatically.

    If the reference is explicitly specified in ifugnx.cfg under "placementmacro=", the name does not matter.

    1. Make sure that the correct key for your installation is activated.

    2. Replace the corresponding standard template with the recorded macro file.

    Entsprechender Ausschnitt aus ifugnx.cfg mit "placementmacro" Schlüsseln

    Entsprechender Ausschnitt aus ifugnx.cfg mit "placementmacro" Schlüsseln

  11. Test the macro from PARTdataManager once with a single part and once with an assembly, possibly again with an inch part.

    After the part transfer, click on the green arrow (native placement dialog).

    -> The NX placement dialog should now show exactly the settings you made when recording the macro.

  12. Optional check: Take a look at the macro file cns_place.macro in the user directory.

    This should show exactly the current matching replacements after each export.