hexagon logo

Where are the latest Patran 2017 PCL programming manuals and where are the detailed instructions for the gm_write_image function?

Where are the Patran 2017 manuals for PCL programming. The last ones I have are for 2013. Specifically you have altered the behavior of the gm_write_image function and I need to see what has changed between v2013 and v2017.  With v2017 I am now getting images saved with 32 bit color depth which is a problem compared to what I was getting before from Patran v2014 which were 8 bit color depth.  When I look up gm_write_image on your website I find nothing, and when I lookup "Patran Manuals" I find nothing. And with my new Patran 2017 installation I see no PCL programming manuals.  Why is it so difficult to get information about PCL programming?
  • Hi Toby,
     
    All of patran documentation is/ should be available by F1 Key from patran. It would point you to following link. I have just verified it and it points to the following link.
     
     
    In this you can do a search for gm_write_image and you should find two instances relating to this fuction.
     
    gm_write_image
    ( <image_type >, <filename>, <version_logic>, <xpcnt >, <ypcnt>, <width_pcnt>, <height_pcnt>, <quality>, <xyplot>)
     
    Description:
    The function prepares an image file of the specified type of the current viewport. It returns an integer status of 0 on success and 1 on failure.
    Input:
    STRING
    image_type[]
    The typeof the image file – BMP, JPEG, PNG, TIFF, VRML.
    STRING
    filename[]
    The name of the file to write the image with the file extensions - bmp, jpg, png, tif, wrl.
    STRING
    version_logic[]
    String to specify the version logic for writing the image file – “Overwrite”, “Increment”. Any other string defaults to “Increment”.
    REAL
    xpcnt
    The starting percentage of the viewport for the image file in the horizontal direction.
    REAL
    ypcnt
    The starting percentage of the viewport for the image file in the vertical direction.
    REAL
    width_pcnt
    The ending percentage of the viewport for the image file in the horizontal direction.
    REAL
    height_pcnt
    The ending percentage of the viewport for the image file in the vertical direction.
    INTEGER
    quality
    An integer specifying the quality of image.
    STRING
    xyplot
    The image captured will be of the current XY PLOT window as opposed to the model graphics viewport.
    Output:
      
    INTEGER
    <Return Value>
    0 for success and 1 for failure.
    Error Conditions:
    None.
     
  • Hi Sanjay,

    Thanks very much for the quick reply. That information is just what I was looking for. I have many PCL scripts that I have been using successfully with Patran v2014 for post processing. I generate many plot files using PNG format which gives best results. However, I just noticed that when I use Patran v2017 with these same script files I now get PNG image files that are much larger and worst of all they all have yellow background instead of white. When I investigage further I find that Patran v2014 saved them as 8 bit images (256 colors) but the new v2017 Patran instead saves them as 32 bit color. So I need to find which option to change on the gm_write_image command to get back the old behavior. I do not want and do not need 32 bit color saved to the PNG file. Can you please tell me which function argument to change in order to get back to 8 bit color? I do not see that option available. The manual does not say anything about what the “quality” argument does or what integer values should be. I just want to specify color depth for the image which is VERY important for controlling the file size and background color.

    Also, I was hoping to find pdf PCL manuals on my PC for Patran v2017. But instead I see that it looks like I have to use internet to see the manuals with F1 keyboard command. This is very very slow for me. It literally takes 20 to 30 seconds for your help website to show up in my browser which is IE v11. So it sounds like if your customers want help then they must be connected to internet and use your website. If I have no internet access or slow internet access, then how do I get to the Patran PCL help? I did finally find all the available PCL manuals for my v2017 patran in pdf format. But nowhere is gm_write_image mentioned in any of those manuals. Instead from your website help search I see that this function is only described in the PCL manual for something called “Acumen”. What is Acumen? I have no idea. Can I get the pdf manuals for Acumen so I can have PCL detailed function descripitons without internet access?

    Thanks,
    Toby Norris

    Toby Norris
    Huntsville Design Center
    The Boeing Company
    256-721-3459 office
    602-315-3421 mobile
  • Note that the above link is going to the online documents, if you download and install the Patran documentation package from the software solutions download centre then it will be on your local machines and faster to access.
    Additionally individual pdf documents can be downloaded from the simcompanion site and a relevant page for finding Patran docs is :
     
     
  • Hi Toby,
     
    Not all the functions are documented or exposed in the PCL. And the details at which they are documented is varied. Acumen was a product ( one available under umbrella of Patran ) which allow greater level of access and that is why you are finding it under ACUMEN. As for the issue of the quality of the images, it may be related to other issues ( such as graphics cards settings) and we will have to investigate. If others on the forum have dealt with this and have avoidance please comment.
     
    Thanks,
    Sanjay.
  • Thanks Arthur.  I was finally able to find and download the latest pdf help files on your website for Patran v2017 PCL programming.  Unfortunately, none of those manuals even mention the very important gm_write_image command.  Your online help search does provide information for this command as part of the "Acumen" help.  But that is actually a different command that only has 8 arguments.   The Patran command actually has 9 arguments as you can see from the code excerpt below.  That excerpt shows how I am using this function to write out plot files. 
     
    Your programmers have apparently change the behavior of this command with Patran v2017 to write out much higher color depth than with v2014.  So now my plot files are much larger and have yellow background instead white background. 
     
    I just need to know which function argument needs to be changed so I can get 8 bit color image files in png format. 
     
      gm_write_image( "PNG", PlotFileName"Overwrite", 0., 0., 1., 1., 0, "Viewport" )
     
    Thanks,
    Toby
      
  • is the Acumen function description manual
     
    There the function gm_write_image is documented with 9 options.
    But: There is no difference between 2014 and 2017 and there is no option that has an influence to the output quality (the quality option is for the jpeg quality only).
    And yes, the image output bit depth has been changed beetwen 2014 and 2017 from 8 to 32bit. There is no Patran option to change this. I recomend to run an external tool like ImageMagic to convert the images.
     
     
  • Just to touch on your point about the difficulty of finding information on gm_write_image: it can sometimes be problematic to find particular functions, because the PCL documentation is spread across different sections of the overall help system.
    The most effective way to access the docs is to install the documentation package locally, as Arthur suggested. This is HTML-based and in terms of functionality is the same as the web link you've already accessed (but faster). Among the benefits is the ability to easily search across the whole of the documentation. It also comes with a comprehensive index, meaning that if you know the name of a function it's easy to find it without having to check multiple PDFs.
     
    Also note that for most functions there's a code example as well as the function description. The code example for gm_write_image unfortunately seems to be rather old and as you noted only has 8 arguments. The function description has all 9.
     
    ScreenShot2511
     
    ScreenShot2512
    I hope this is useful.