Depends on how you want to attack the problem and how many parameters you want 
to hide/unhide in the PPGLayout.

If it’s only one or two parameters, you can call Parameter.Show(), then follow 
with PPG.Refresh() to update the PPG.  If you have a large number of 
parameters, then it might be easier to write your own PPG_DefineLayout () 
function and call it explicitly as needed from an _OnChanged() or _OnClicked() 
PPG Event, or during _OnInit().  In either case you may run into display 
glitches with hiding/unhiding parameters dynamically such as indenting and 
other alignments getting screwed up, or PPG’s growing/shrinking pushing things 
into undesirable locations – especially if embedding the logic into something 
like a relational view.

I generally enable/disable parameters instead using Parameter.Enable() as it 
keeps the PPG size constant and better informs the user of the options 
available in the tool.  Seeing which buttons/parameters activate the 
enabled/disabled parameters also helps educate the user of the cause n’ effect 
relationship.  In many cases enable/disable doesn’t require a call to 
PPG.Refresh() making it faster for PPG’s that have a large number of 
parameters.  We have a few custom properties with 400+ parameters.  
Enabling/disabling parameters is significantly faster than hiding/unhiding 
parameters in those cases.


Matt





From: [email protected] 
[mailto:[email protected]] On Behalf Of Dan Yargici
Sent: Monday, June 02, 2014 9:38 AM
To: [email protected]
Subject: Hiding an item from a PPG

I'd like my self-installed custom property to hide or show one dropdown 
depending on the value set by another, and I'm failing miserably.

Do I need to completely rebuild my PPGLayout just to do this?  That seems wrong 
to me.

If that is the case, how should I best structure my code in order to repeatedly 
rebuild the layout via the triggered OnChanged event?  Should I always build it 
in my own function or in the "_DefineLayout" section of the plugin (as made by 
the SDK Wizard)

As you can tell, I'm new to this.

Thanks,

DAN

Reply via email to