Jump to content

ImageControl2 - Modern Dialogue


twk

Recommended Posts

Greetings all, I'm trying to wrap my head around, showing an image in dialogue.

 

I see this function call:

def vs.CreateImageControl2(dialogID, controlID, widthInPixels, heightInPixels, imageSpecifier):
    return None

..but can't get it to work. The issue is with the 'imageSpecifier' parameter.

 

Looking at other posts, https://forum.vectorworks.net/index.php?/topic/41757-2014-script-will-not-run-in-2015/&do=findComment&comment=209508

 

@klinzey instructed the use of a folder named _some_name.vwr, with your image in there, and use that path for the imageSpecifier. However, what if you want your image structured down the folder channel the same way your plugins are structured. Eg

AppData
|-- Roaming
|---- Nemetscheck
|------ Vectorworks
|-------- 2016
|---------- Plugins
|------------ TuiPlugins
|-------------- PluginImages
|----------------| rectange.png
|-------------- Rectangle.vso

full_image_path = "TuiPlugins\PluginImages\rectangle.png"

def CreateDialog():
	-- vs.CreateResizableLayout(etc,etc..)
	-- vs.CreatePullDownMenu(etc,etc..)
	-- vs.CreateEditText(etc,etc..)
	-- vs.CreateImageControl2(dialog, k_image , 200, 200, "{}".format(full_image_path))

can this be done? Or does the folder have to have the .vwr characters appended to it? And can the location of this *.vwr folder be placed further down?

 

Hope this makes sense :D

 

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