AVEVA Community
AVEVA Community
  • Site
  • User
  • Site
  • Search
  • User
PDMS/E3D Forum
  • AVEVA World
PDMS/E3D Forum
PDMS Guides Short PML guide
  • Forums
  • Resources
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Replies 36 replies
  • Subscribers 1 subscriber
  • Views 243 views
  • Users 0 members are here
Options
  • Share
  • More
  • Cancel
Related

Short PML guide

Adnan Dervisevic
Adnan Dervisevic over 14 years ago
 
  • Sign in to reply
  • Cancel
  • ura
    ura over 10 years ago
    This is c# code. You will have to compile it then edit some files to make it work. I recommend using the PML way for now (It's all inclusive and you can check/troubleshoot the form and code as you build it.
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Han_BFY
    Han_BFY over 10 years ago
    yup that was c# code.. will compile as .dll (dynamic link library) to run it.
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Han_BFY
    Han_BFY over 10 years ago
    Agree with Juno... PML will be better.
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Benj Duarte
    Benj Duarte over 9 years ago
    Agree with Juno... PML will be better.


    hi,

    good day!
    Yes, this is a c# code and you cannot run this on command line of PDMS Design or whatever module, try to copy the codes and open Report Designer(built-in in PDMS), modify the event, because some event control is not working, validate and Run. it works fine with me.

    Fyi, this is another way of getting the value of attribute from datasource using c# code.

    Ex:
    //Getting the name of element - same output

    string strName = Convert.ToString(GetCurrentColumnValue("FLNN"));
    or
    string strName =  CurrentElement.Element.GetAsString(DbAttributeInstance.FLNN);

    try below update:

    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Text;
    using System.Windows.Forms;

    using Aveva.ApplicationFramework;
    using Aveva.ApplicationFramework.Presentation;
    using Aveva.Pdms.Shared;
    using Aveva.Pdms.Database;
    using Aveva.Pdms.Geometry;
    using Aveva.Pdms.Utilities.CommandLine;


    private void NewReport_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
    {
     string strName = CurrentElement.Element.GetAsString(DbAttributeInstance.FLNN);
     MessageBox.Show(strName +"");
    }

    P.S. make sure you already setup the datasource of the report.

    thanks
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • sathish kumar baskar
    sathish kumar baskar over 7 years ago
    [COLOR=#333333]open Report Designer(built-in in PDMS)[/COLOR]


    where it is available...?
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Tamizhazhagan
    Tamizhazhagan over 6 years ago
    Thank you...
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
<