Jump to content
Developer Wiki and Function Reference Links ×

Set visibility parameters in default PIO


rebu1985

Recommended Posts

Hi guys,

 

I have done a script to hide some fields of the default PIO 'Desk' because I just need some parameters to work. The plug-in is compiled right but when its not working because nothing is done. My version is VW14.

My idea is to create different script for default PIO doors and windows but using a few parameters. 

 

My script is below:

 

 

PROCEDURE Modifydesk;
VAR
objHd: HANDLE;

BEGIN
objHd:= GetObject('Desk');

    IF objHd=NIL THEN 
    EnableParameter(objHd, 'Leg Height', FALSE);
    SetParameterVisibility(objHd, 'Leg Height', FALSE);
END;
RUN (Modifydesk);

Link to comment

To start, you have a few issues with your script in general:

- Your if statement tests to see if the handle is empty, so your then case only executes if handle acquisition is unsuccessful

- You have two statements that are a consequence of your if statement, so you need to put them in an if/then block.

Also, the parameter calls are designed to work on a plug-in instance rather than the plug-in default, the latter being the handle you retrieve.

The following script will affect the visible parameters of the selected instance of a Desk object:

PROCEDURE Modifydesk;
VAR
objHd: HANDLE;

BEGIN
	objHd:= FSActLayer;

	IF objHd<>NIL THEN BEGIN
		EnableParameter(objHd, 'Leg Height', FALSE);
		SetParameterVisibility(objHd, 'Leg Height', FALSE);
	END;
END;
RUN (Modifydesk);

A couple other things to note.  The OIP needs a refresh, so de-select and re-select the object to see the OIP refresh.  These commands are really meant to run from inside the plug-in code, so as soon as you change one of the plug-in’s parameters, the OIP resets to show the field.

So, unfortunately, customizing the display options for plug-ins that you don’t code or don’t have that as an explicit feature isn’t possible.

-Josh

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...