Jump to content
Developer Wiki and Function Reference Links ×

Create image for ImageControl


Recommended Posts

  • Vectorworks, Inc Employee

Create a symbol you want to use for the graphic.

Use GetObject() with ths symbol name to get a handle to the symdef.

BeginSym and EndSym are when you are creating a symbol def in the script. Which you might want to do if you're changing the symbol around, but it isn't necessary to use the symbol display control.

Link to comment

Nope, GetObject() doesn't work either.

I see the symbol in my resource browser, so it's created with the script.

Maybe there are requirements I need to consider on how the symbol must be? Size? No?

Edit:

should I use SetImageControlPath? Because that function is not working! And I think it's because of the lengt of its function name. There is also a SetImageControlHandle. And I noticed that when you have two names where the first 'x' letters are the same, VS think they are the same!

Can you post an example that's working with that imageControl? I tried so many different things and it is not working.

Note that I used CreateImageControl and not CreateControl because I do not want to use an extra (vss) file

Edited by DWorks
Link to comment
  • 2 weeks later...
  • 1 year later...

Auto-answer.

OK. The trick is to create symbols by script and erasing them after having called the dialog. Simple.

1. PIO (door for example)

2. Check-box in the info palette calling the dialog (a vss in this case)

3. Go back to the PIO after having hit 'OK' and uncheck the check-box. The symbols created are erased by the way.

I found these problems :

- The screen doesn't regenerate even with 'redrawall'. There's to put a 'SetZoom(GetZoom)' in the pio code.

- The latest symbol drawn remains in the ressource palette.

Link to comment
  • Vectorworks, Inc Employee

Your screen redraw problem is because you are showing the dialog during the object reset event. You need to use an event enabled object with a button to run the dialog.

You can create a temp symbol by using BeginContext and EndContext(0) within the script.

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