1. Mihai Apostol
  2. PowerBuilder
  3. Thursday, 24 October 2019 17:39 PM UTC

Hi all, 

 

How can I find the list of unused(not referenced by) objects in a PB2019 project?

 

 

Thanks

 

 

 

Accepted Answer
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Thursday, 24 October 2019 21:27 PM UTC
  2. PowerBuilder
  3. # Permalink

Okay, here it is in attached images (how to get the list of unreferenced with PBL peeper).

Use the pbl-peeper tool (there are 3 shorcuts installed, use the one that doesn't say "find" or "browse").

See the attached images in numeric order and explanatory filenames.

  • 01 drag a workspace or in this case a target to the right panel.PNG
  • 02 select report tabpage and mark the check box for crossreference and click GO.PNG
  • 03 lots of results after 02.PNG
  • 04 select Window and then Unreferenced Objects.png
  • 05 you can order the list by clicking on the header of PBL column and export to text, excel, etc.png

My advice is to export every unreferenced object before you delete it, so you'll have a backup.

Once you have finished deleting unreferenced objects, run the tool again, since you might have deleted an object A which was causing object B to be referenced (by A) and now that you've deleted A, B is a newly unreferenced object.

So "rinse and repeat" until you have no longer any unreferenced objects.

 

What you have to be careful with is objects you might use as strings dynamically in a function OpenUserobject( string var) or dataobjects that you assign with names in variables obtained from a database or concatenated names.

So at least before you delete userobjects, datawindows or datastores do a full search on its name in the whole target.

 

 Also, you might have unreferenced objects which form part of classes like the PFC's or common libraries. You don't want to delete those, since one day you might want to use them.

 

 

Attachments (5)
Comment
  1. Miguel Leeuwe
  2. Thursday, 24 October 2019 21:46 PM UTC
(Gosh, from the results of this demo, I see I have some cleaning to do myself :)

  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Thursday, 24 October 2019 19:54 PM UTC
  2. PowerBuilder
  3. # 1

Hi Mapo;

   You can try the PBSearch tool ... http://www.topwizprogramming.com/pbsearch.html

HTH

Regards ... Chris

Comment
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Thursday, 24 October 2019 20:04 PM UTC
  2. PowerBuilder
  3. # 2

If I remember well, techno kitten's pbl-peeper also has the possibility to report 'unreferenced /unused' objects:

look for "Crossreference" on this page: http://www.techno-kitten.com/PBL_Peeper/Online_Manual/Reports_Page/reports_page.html

Home page:

http://www.techno-kitten.com/PBL_Peeper/pbl_peeper.html

Comment
There are no comments made yet.
Mihai Apostol Accepted Answer Pending Moderation
  1. Thursday, 24 October 2019 20:23 PM UTC
  2. PowerBuilder
  3. # 3

Thank you Chris,

I guess it's a good tool but at the moment I only need it once and it's not free :(

Comment
  1. Roland Smith
  2. Thursday, 24 October 2019 20:31 PM UTC
In demo mode it runs unrestricted for 30 days.
  1. Helpful
There are no comments made yet.
Mihai Apostol Accepted Answer Pending Moderation
  1. Thursday, 24 October 2019 20:24 PM UTC
  2. PowerBuilder
  3. # 4

Thank you Miguel,

I have already tried pbl-peeper but I cannot find how to filter from the list of results only objects that have no reference. And the report returned ~ 10,000 lines.

Comment
  1. Miguel Leeuwe
  2. Thursday, 24 October 2019 20:54 PM UTC
Yes I remember I also had trouble figuring it out, let me have a look because at the end I did manage to get that list.
  1. Helpful
There are no comments made yet.
Mihai Apostol Accepted Answer Pending Moderation
  1. Friday, 25 October 2019 00:38 AM UTC
  2. PowerBuilder
  3. # 5

Thank you very much Miguel for your detailed answer! This did the job, I was missing the point 04. Hope Apeon will ever enrich PB IDE with small specialties like this. 

Comment
  1. Miguel Leeuwe
  2. Friday, 25 October 2019 03:26 AM UTC
YW, yes, this is a great little tool, but sometimes not very clear in "how to use".
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.