List panel references from objects in panel

Find and share HowTos to various installations / configurations!
6 posts • Page 1 of 1
fandersen
Posts:51
Joined: Tue Aug 26, 2014 12:39 pm

List panel references from objects in panel

Post by fandersen »

Hi,

for a migration project I want to list all the typical panels that are referenced in the process picture panels. Therefore I would write a CTRL script which goes through a list of panels and writes the referenced panels to a file.

I know how to iterate through the graphical objects in a panel. But which property / attribute gives me the panel path like shown in the attached screenshot?

Code: Select all

main()
{
  int i;
  dyn_string shapes;
  
  shapes = getShapes(myModuleName(), myPanelName(), "", "");
  
  for(i = 1; i
Attachments
reference_panel_name.PNG

fandersen
Posts:51
Joined: Tue Aug 26, 2014 12:39 pm

Re: List panel references from objects in panel

Post by fandersen »

Another solution may be to parse all the interesting pnl-files for lines beginning like this:

"objects/CONTROL/controller_symbol_ref.pnl"

I think this solution will be good enough.

mkoller
Posts:741
Joined: Fri Sep 17, 2010 9:03 am

Re: List panel references from objects in panel

Post by mkoller »

The PanelRef has the attribute "panelFileName" which you can get via getValue()

AGorbatykh
Posts:59
Joined: Thu Dec 17, 2015 1:01 pm

Re: List panel references from objects in panel

Post by AGorbatykh »

Martin Koller wrote:
The PanelRef has the attribute "panelFileName" which you can get via getValue()
and what about $-Parameter? How could I get them?
getValue("panel1", "$-Parameter", str) - doesn't works

mkoller
Posts:741
Joined: Fri Sep 17, 2010 9:03 am

Re: List panel references from objects in panel

Post by mkoller »

The PanelRef also has the attribute "dollars" which gives you all dollar parameters in a mapping

AGorbatykh
Posts:59
Joined: Thu Dec 17, 2015 1:01 pm

Re: List panel references from objects in panel

Post by AGorbatykh »

Thanks!

Code: Select all

mapping dps;
getValue("panel1", "dollars", dps);
DebugN(dps);
WCCOAui1:[mapping 1 items
WCCOAui1: "$DP" : "System1.H1:L1.D1.K1.t"
WCCOAui1:]

6 posts • Page 1 of 1