hexagon logo

PCL; Utilities/Views Based On CoordX - is it possible to execute with PCL?

Hello! I am investigating possibilities for result display adjustment and I found Utilities/Views Based On CoordX . Running this utility does not produce any PCL output. Is it possible to run this through PCL?
  • Hi Adam,
    I've been away and so missed your reply in an earlier post.
    You can probably use the Local view utility to do what you want. I set this to record standard patran commands in the session file to guarantee it was always replayable, so it does not record the inherent ajh_view... calls. I hope these calls will help you to do what you want:
    ui_exec_function("ajh_view_local","init")
    ajh_view_local.get_current_view()
     
    $ this sets Local view to use coord xx as its reference
    ajh_view_local.cid("Coord 0")
    ajh_view_local.apply_transforms()
     
    $ this applies a predefined view using the local view reference frame : front_view, rear_view, top_view, bottom_view, left_side, right_side, isometric1, isometric2, isometric3, isometric4. e.g:
    ajh_view_local.top_view()
     
    Note these ten views are the same as the standard home tool bar (but using the reference frame), but they can be changed using:
    ajh_view_local.set_view_viewsZ_Y(viewsZ_Y)
    where viewsZ_Y is a "Real viewsZ_Y(10,6)" each of the ten views is defined using an x,y,z with respect to the reference frame for the observer position (screen Z) and the screen Y (top of screen). You can get the defaults using:
    ajh_view_local.get_view_viewsZ_Y(viewsZ_Y)
     
    best regards
    Arthur
  • Hi Arthur,
     
    This is what I have been looking for.
     
    Thank you,
    Adam
  • Hi!
    I noticed that ui_exec_function("ajh_view_local","init") works with Patran 2023 but how to execute the utility in Patran 2022?
  • Hi Adam,
    yes, the local view stuff was added into the standard utilities in 2023.
    To use it in 2022 you can try copying the "utilities.plb" file from the 2023 install (e.g. C:\Program Files\MSC.Software\Patran_x64\20233\shareware\msc\unsupported\utilities\plb\utilities.plb ) to the 2022 install. I think this will be unlikely to cause any issues but make a backup copy of the origial plb before doing so in case you need to revert to it.
    best regards, Arthur