Jump to content
Developer Wiki and Function Reference Links ×

How to insert a symbol into a document via a script


Recommended Posts

So I am trying to build my first plug-in and I am totally stuck. I can't seem to get the function for inserting a symbol to work.

Yes, I have read the documentation in the SDK. Yes, I understand the the function is Symbol( symbolName, pX, pY, rotationangle), but I just can't seem to figure out what I am doing wrong.

Does any have an example of a script that allows users to click on a spot on the document to insert a symbol, that they would like to share in order to help me out?

Thanks,

Tyler

Edited by Tyler@Sholight
Link to comment

Tyler,

What exactly isn't working for you-- are you getting an error message, or does the script run but you don't see your symbol?

What kind of plug-in are you building -- object, menu, or tool?

This may just be semantics, but Symbol() is a procedure, not a function, meaning that it does not return any information.

-Josh

Link to comment

Tyler,

???If it's a Menu Command plugin or Tool plugin you're writing, you'll need to use something like:

GetPt(pX, pY);

Symbol( 'My Symbol', pX, pY, rotationangle);?????{ explicit name }

or

GetPt(pX, pY);

symbolName := 'My Symbol';

Symbol(symbolName, pX, pY, rotationangle);?????{ variable name }

???If you're writing another type of object please describe more of what you are doing. Answers will vary.

HTH,

Raymond

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