Jump to content
Developer Wiki and Function Reference Links ×

Edit or convert styled plugin object


Recommended Posts

If I insert a plugin object in a drawing and the fields are not controlled by the style I can edit the instance of the plugin in the drawings fields.  

What I would like to be able to do is:

  1. Edit the fields of a plugin that are by style with a vectorscript so every instance is edited. 
  2. If I cannot do that then I would like to be able to insert the styled plugin in the drawing and then convert it to an unstyled plugin using a vectorscript before editing the fields.

 

  Anyone know how to do either of these. 

Link to comment

I don't understand your question.  

 

You can certainly edit the style using a script.  Get a handle to the symbol in the Resource Manager that defines the style and use SetRField to change the values in the parameter record. Those changes will apply to every instance of the Styled Object after the changes are made. And those modifications will also apply to all future objects created using the Style.

 

But you will need to know which fields you want to modify and how you want to modify them. I think you can walk the parameter record field by field and see which are ByStyle and which are ByInstance.  GetParamStyleType is the function you need to do the test. 0= By Instance. 1 = By Style.

 

Link to comment

No time to completely troubleshoot, but you need to get a handle to the PIO inside the Style Red Symbol. FinSymDef. And then make the changes to the record attached to that object.

 

I made it work with door.manuf in the data pane.

 

But even though the change took with the style and the field is set to be ByStyle, it did not propagate into objects on the drawing.

 

Probably need to do a Reset on either the PIO or the Style Sym Def. but I haven't found the right incantation yet.

 

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