Jump to content
Developer Wiki and Function Reference Links ×

SetClass on individule components within a PIO


Recommended Posts

Hi All,

I am working on a PIO which is made up of serveral different components, each component is set with the default class of the overall PIO.

Using the 'Classes Pop-up' in the parameters list I have created 3 classes pop-ups so that each of the three components can have independant classes.

What script do you use to assign each component to a classes pop-up?

So far I've been using this with no luck

SetClass (Handle, pClassAAA);

SetFillColorByClass(Handle);

SetPenColorByClass(Handle);

SetFPatByClass(Handle);

SetLWByClass(Handle);

SetLSByClass(Handle);

Any help would be great.

Cheers

Joshua

Link to comment

Joshua,

Assuming your class pop-up is called "ClassAAA," your code is correct. It is possible that you are not correctly getting a handle to the object you want to class. Inserting Message(Handle) and checking for a non-zero result could be a troubleshooting step. Also, try duplicating your plug-in and converting to group. You can then look at each component in Object Info and see what is going on.

HTH,

Josh

Link to comment

Cheers Josh

I was looking at my script and got it to work, the problem arose when I was trying to use that code on a component which was created from AddSolids' then I can't get it to work...

I can't seem to be able to select the handle of the new component after using the:

result := AddSolid(h1, h2, Handle);

SetClass (Handle, pClassAAA);

Is there an exttra step I can take to correctly get the handle to the new solid?

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