2.3.7.9.2. Procedure when using NX with Teamcenter

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 (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...

    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.

    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 opens.

    2. Click on Reset.

    3. Click on the Open button.

      -> The Part file name dialog box opens.

    4. Select the Teamcenter option in the list field under Look In.

      [Note]Note

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

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

      To find out the relevant information, open My Teamcenter -> Home -> Newstuff.

    6. Enter a valid item ID in the input field under Number.

      Use TAB to switch to the next field and enter a valid revision under Revision.

      Close the dialog by clicking OK.

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

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

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

      "Preview Window" enabled

      "Preview Window" enabled

    10. 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 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 comparison program such as Beyond Compare and load your macro recording on one side and one of the Teamcenter standard templates at ...\iface\unigraphics\shared\macro(e.g. cns_place_nx2007_teamcenter.macro) on the other side.

      [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.

      Only lines in the standard macro that have double angle brackets are decisive for the replacement.

    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: If there are very frequent occurrences to be replaced, it is also a good idea to work with search & replace instead of transferring each individual occurrence with 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

      It is better not to use the Replace All command, but Replace. Not all occurrences of the number must be replaced by the same placeholder!

      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 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 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.

    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 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 from PARTdataManager once with a single part and once with an assembly, possibly 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 check: Take a look at the macro file cns_place.macro in the user directory.

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