twk Posted January 31, 2017 Share Posted January 31, 2017 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 Quote Link to comment
twk Posted February 6, 2017 Author Share Posted February 6, 2017 hmm, strange, full path name worked.. just got my seperators wrong, should've used forward slashes(/) instead of backslashes (\) Quote Link to comment
Recommended Posts
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.