Jump to content
Developer Wiki and Function Reference Links ×

Basic Symbol insertion tool/script


Recommended Posts

Hi All.

 

Let me premise by saying i am completely new to trying to make my own plugins or doing any scripting!

 

Ive done a bunch of searching and playing around and i think im slowly getting where i need to but figured it wouldnt hurt to reach out to try speed up the process.

 

All i am trying to make is a very basic tool that inserts a specified symbol (Essentially just like the insert symbol tool) However i then want to have some controllable options from the OIP.

 

I can get a basic script to do the Symbol insertion.

I can get a basic tool with editable things in the OIP. (but no symbol)

 

However i cant make it so the Symbol is a PIO with settings editible in the OIP

 

Hope that makes sense!

Link to comment

You seem to be describing a Plug In Object. PIOs will create their own insertion tool, with the interface for a point PIO being very similar to the symbol insertion tool. 
The script component for a simple PIO should draw the elements you want to display, with the origin of the scripted elements being the insertion point of the object (like a symbol definition). 
Your script can insert a symbol at the origin. You can also code all the geometry of the elements you want to draw, and it will appear symbol-like to the user. 

  • Like 1
Link to comment
10 hours ago, JBenghiat said:

You seem to be describing a Plug In Object. PIOs will create their own insertion tool, with the interface for a point PIO being very similar to the symbol insertion tool. 
The script component for a simple PIO should draw the elements you want to display, with the origin of the scripted elements being the insertion point of the object (like a symbol definition). 
Your script can insert a symbol at the origin. You can also code all the geometry of the elements you want to draw, and it will appear symbol-like to the user. 

Is there an example of a script to insert a symbol?

Ive found several for drawing an object but none to insert a symbol

Link to comment
1 minute ago, JBenghiat said:

This will place the symbol symbolName at the center of the PIO, facing up.

Actually, it will place the symbol at the insertion point of the PIO.  The insertion point is where you click when you place the PIO.  If  you want to offset the symbol from where you click, put the amount of offset in the Symbol() call as measured from the click.

  • Like 1
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...