Dieter @ DWorks Posted December 20, 2007 Share Posted December 20, 2007 I now how to make an ImageControl using: CreateImageControl. The last parameter is a handle to an image. The question is: how to you create the image? I tried to create things in the pio and return the handle to the image control, but it doesn't work. Quote Link to comment
Vectorworks, Inc Employee Robert Anderson Posted December 22, 2007 Vectorworks, Inc Employee Share Posted December 22, 2007 The handle is to a symbol def. Draw things into a (usually temporary) symbol definition and get a handle to it... Quote Link to comment
Vectorworks, Inc Employee Robert Anderson Posted December 22, 2007 Vectorworks, Inc Employee Share Posted December 22, 2007 The handle is to a symbol def. Draw things into a (usually temporary) symbol definition and get a handle to it... Quote Link to comment
Dieter @ DWorks Posted December 23, 2007 Author Share Posted December 23, 2007 k, thx, I will try this Quote Link to comment
Dieter @ DWorks Posted December 25, 2007 Author Share Posted December 25, 2007 It's not working Robert, I created the symbol, got the handle to it, but nothing happens. Is there something else that needs te be done? Or is this not working in 12.5? Quote Link to comment
ccroft Posted December 25, 2007 Share Posted December 25, 2007 Hi D Robert seems to say you want the handle to the symbol definition in the symbol folder, not the symbol instance in the drawing. Not sure from your post which one you're using. Quote Link to comment
Dieter @ DWorks Posted December 26, 2007 Author Share Posted December 26, 2007 I got the handle from ActSymDef. And this after using SetActSymbol. And this after using BeginSym-EndSym. This is the symbol definition right? Quote Link to comment
Vectorworks, Inc Employee Robert Anderson Posted December 26, 2007 Vectorworks, Inc Employee Share Posted December 26, 2007 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. Quote Link to comment
MullinRJ Posted December 27, 2007 Share Posted December 27, 2007 Or if you have an instance selected in the drawing use: GetObject(GetSymName(FSActLayer)); Quote Link to comment
Dieter @ DWorks Posted December 27, 2007 Author Share Posted December 27, 2007 (edited) 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 December 27, 2007 by DWorks Quote Link to comment
Dieter @ DWorks Posted January 7, 2008 Author Share Posted January 7, 2008 Anyone? Quote Link to comment
Charles Chandler Posted January 10, 2008 Share Posted January 10, 2008 Use CreateSymbolDisplayControl instead. There's an example in the online function reference. By the way, VectorScript recognizes the first 20 characters of function, procedure, constant, and variable names. Characters after that can be present but are ignored. Quote Link to comment
Dieter @ DWorks Posted January 14, 2008 Author Share Posted January 14, 2008 that's a good alternative to use. I check this out. Although I have a workoaround now, I would like to see this problem solved. Quote Link to comment
arthur&l?on Posted January 30, 2009 Share Posted January 30, 2009 Hello. This works...until there's a symbol. What about a permanent image control in a dialog ? A handle to a picture ? Thanks in advance. Quote Link to comment
arthur&l?on Posted February 2, 2009 Share Posted February 2, 2009 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. Quote Link to comment
Vectorworks, Inc Employee klinzey Posted February 2, 2009 Vectorworks, Inc Employee Share Posted February 2, 2009 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. Quote Link to comment
arthur&l?on Posted February 4, 2009 Share Posted February 4, 2009 Thanks for your reply. The button deal seems more hermetic to me, anyway. There's some info around ? Francesco Quote Link to comment
Vectorworks, Inc Employee klinzey Posted February 4, 2009 Vectorworks, Inc Employee Share Posted February 4, 2009 Check out: Parametric Custom Shape Pane 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.