Jump to content
Developer Wiki and Function Reference Links ×

Ending and Deleting my Plug in


Recommended Posts

Hi All,

This might seem like a really easy question, however I will ask it anyway:

I am using the RealDialog function to change the wall width of my a wall I am inserting the PIO in to (shown below)

WallW:=RealDialog('The wall thickness must be either 100 mm.

By changing the wall thickness this will remove the wall style.

Please enter a new wall thickness.','100');

IF (WallW <> 100) THEN

done:=TRUE;

UNTIL (WallW = 100);

IF NOT DidCancel THEN BEGIN

WallBool := ConvertToUnstyledWall(wallHd);

WallBool := DeleteAllComponents(wallHd);

WallBool := SetWallThickness(wallHd, WallW);

SetRFiel(PIOName,recname,'WallWidth',Num2Str(0,WallW));

END;

If the end user presses cancel I want to be able to cancel the whole script and delete the PIO, which functions would I need to use to be able to do this?

Thanks,

Joshua

Link to comment

Use a menu or tool script instead to present the dialog and decide whether to insert or not the plugin. You cannot delete the plugin within its own script. If there was a need to delete a PIO, it would have to be done by an external script.

You can insert a PIO with:

FUNCTION CreateCustomObjectN

(objectName : STRING;

pX,pY : REAL;

rotationAngle: REAL;

showPref :BOOLEAN): HANDLE;

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...