2.3.6.8.2. Procedure when using NX with Teamcenter

Make sure that the correct macro template is active in ifugnx.cfg and perform a placing with a test part. Ideally, all settings in the template are already designed as actually required. In this case any adjustments are unnecessary.

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 (by default 27)" is activated.

    Menu -> Format -> Layer Settings

    Menu -> Format -> Layer Settings

    Layer 27 activated

    Layer 27 activated

  4. Perform a placing as a test. Then for the macro recording you should not make a mistake.

  5. Open a new model.

  6. Start macro recording.

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

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

    Determine the macro's storage location and file name and confirm with OK. Save the macro, best in the directory intended for this purpose under ...\iface\unigraphics\shared\macro\cns_place_....macro.

    Dialog "Macro Record"

    Dialog "Macro Record"

    -> The record is immediately started.

    [Note]Note

    Each keystroke is decisive! If an error should happen, stop the record and start anew!

    1. Click on Add Component.

      -> The Add Component dialog is opened.

    2. Click on Reset.

    3. Click on the Open button.

      -> The Part file name dialog is opened.

    4. In the list field under Look In, select the option Teamcenter.

      [Note]Note

      If this option should already be displayed, open the list field anyhow and select this option.

    5. Next under Number and Revision, correct entries have to be made.

      In order to get the adequate information, open My Teamcenter -> Home -> Newstuff.

    6. In the input field under Number, enter a valid Item ID.

      Switch to the next field by using the TAB and under Revision, enter a valid revision.

      Close the dialog and by clicking OK.

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

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

    9. Optional: Under Settings -> Interaction Options, disable the option Preview and enable Preview Window.

      "Preview Window" enabled

      "Preview Window" enabled

    10. Finally DO NOT click on 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. In the Macro Playback dialog, select the macro created before.

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

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

    Only proceed, if everything is fine up to now.

  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.

      [Tip]Tip

      Use a program with file compare functions like Beyond Compare, for example and on the one side, load your macro record and on the other side one of the Teamcenter standard templates under ...\iface\unigraphics\shared\macro (e.g. cns_place_nx2007_teamcenter.macro).

      [Note]Note

      An indicator for the detection of the places to be replaced are the lines highlighted in red, which only occur if there are differences between the two loaded versions.

      However, not all red markings have to be replaced.

      Decisive for replacement are only lines in the standard macro which have two angle brackets.

    2. May be you want to replace your user name by "administrator", for example (doesn't matter for functionality).

    3. In the Teamcenter standard template, search for lines with angle brackets.

      Example 1:

      BEG_ITEM 9175040 (1 OPTM 0) = <<CNS_REVISIONRULEINDEX>> ! <<CNS_REVISIONRULE>>
      

      Transfer these lines into the recorded macro with the help of the used comparison tool; in above figure by clicking on the yellow arrow.

      Example 2:

      When clicking on the yellow arrow, on the left, the whole block is overwritten.

      Example 3: In the case of very frequent occurrences it also makes sense to work with Search & Replace functionality, instead of transferring each single occurrence be using the yellow arrow.

      "<<CNS_ITEM_NUMBER>>" replaces concrete occurrences of number in the recorded macro.

      "<<CNS_ITEM_NUMBER>>" replaces concrete occurrences of number in the recorded macro.

      [Caution]Caution

      Better don't use the command Replace All, but Replace. Not all occurrences have to be replaced by the same place holder!

      Example: Replacement of number by "<<CNS_DSET_NAME>>"

      Example: Replacement of number by "<<CNS_DSET_NAME>>"

      "<<CNS_ITEM_REV>>" replaces concrete occurrences of revision in the recorded macro.

      "<<CNS_ITEM_REV>>" replaces concrete occurrences of revision in the recorded macro.

      Example 4: Ignore empty lines.

    4. Optionally, you can delete the following lines at the file end.

      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 has to be performed manually up to NX version 1926 inclusively, for later versions it will happen automatically, so that manual intervention can be omitted, except the macro is recorded for a special NX subversion.

    For later versions no adjustment of name has to be performed. Simply store the recorded macro file under ...\iface\unigraphics\shared\macro according to the schema cns_place_nxXXXX.macro or cns_place_nxXXXX_teamcenter.macro. Then the matching file is automatically detected.

    If the reference is explicitly stated in ifugnx.cfg under "placementmacro=" the name doesn't matter.

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

    2. Replace the corresponding default template by the recorded macro file.

    Excerpt from ifugnx.cfg with "placementmacro" keys

    Excerpt from ifugnx.cfg with "placementmacro" keys

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

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

    -> Now the NX placement dialog should show exactly those settings which had been applied when recording the macro.

  12. Optional checking: Have a look into the macro file cns_place.macro, in the user directory.

    After each export it should show exactly the currently used replacements.