OberonPlace.com Forums  

Go Back   OberonPlace.com Forums > Corel User Forums > Corel PHOTO-PAINT > Macros/Add-ons

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 05-04-2011, 23:15
drawken
Guest
 
Posts: n/a
Default How to open an Effects dialog?

Anyone know how to programmatically open a PP X5 effects dialog box, specifically the "Bump Map" effect dialog?
Reply With Quote
  #2  
Old 06-04-2011, 07:11
runflacruiser's Avatar
runflacruiser runflacruiser is offline
Senior Member
 
Join Date: Jun 2009
Location: Pigeon Forge, TN USA
Posts: 811
Default

HI.
Only with SendKeys as far as I know.

There is a CorelScript Command for BumpMap (CorelScript.EffectBumpMap)

Since my BumpMap effect causes PP to crash it would be interesting to see if this is a work around.
-John
Reply With Quote
  #3  
Old 06-04-2011, 22:11
drawken
Guest
 
Posts: n/a
Default

Quote:
Originally Posted by runflacruiser View Post
HI.
Only with SendKeys as far as I know.

There is a CorelScript Command for BumpMap (CorelScript.EffectBumpMap)

Since my BumpMap effect causes PP to crash it would be interesting to see if this is a work around.
-John
Thanks for the pointer. I tried calling a CorelScript function in another AddIn (I'm working in C#, as you know ) and it didn't work -- I had to find another way to get at that function and I'll need to do the same for this. But that's a good starting point, thaaaanks for the info!

You're exactly right about what I'm trying to accomplish: PP X5 crashes on my Win7 x64 machine whenever I try to use the BumpMap effect and I want to see if launching the BumpMap dialog in the AddIn's process will, by chance, prevent the crashes.
Reply With Quote
  #4  
Old 07-04-2011, 20:06
drawken
Guest
 
Posts: n/a
Default

Update:
The CorelScript.EffectBumpMap() method requires a couple dozen parameters and apparently is meant to apply those params as a BumpMap effect to an object without displaying the BumpMap dialog.
I'll keep plugging away at this. There has to be some sort of PhotoPaint Object or Selection or ? that has a method to call the dialog....
Reply With Quote
  #5  
Old 10-04-2011, 20:16
shelbym's Avatar
shelbym shelbym is offline
Senior Member
 
Join Date: Nov 2002
Location: Cheyenne, WY
Posts: 1,769
Blog Entries: 9
Send a message via ICQ to shelbym Send a message via AIM to shelbym Send a message via MSN to shelbym Send a message via Yahoo to shelbym
Default Bump-map

Here is how you would do it (unfortunately it still crashes X5, so it does not work as a workaround)
Code:
Sub TestBumpMap()
    Dim cs As Object
    
    Set cs = Application.CorelScript
    cs.BitmapEffect "Bump-map", "BumpMapEffect BumpMapPath=C:\Program Files\Corel\CorelDRAW Graphics Suite X5\Custom Data\Bumpmap, BumpMapFile=Veins.cpt, Mode=0, TileWidth=300, TileHeight=300, Invert=1, Smooth=0, ScaleFactor=10, Floor=0, Ceiling=255, Highlight=0, Direction=315, Declination=25, Brightness=75, AutoAmbient=1, AmbientBrightness=68, Tint=5:255:255:255, AmbientTint=5:255:255:255"
End Sub
-Shelby
Reply With Quote
  #6  
Old 11-04-2011, 00:56
drawken
Guest
 
Posts: n/a
Default

Hi Shelby,
Thanks for the reply, but I'm unable to use any CorelScript functions in an Addin written in C#. Keep getting errors about unsupported COM object casts and non-existent interfaces.

Are you saying that the code you posted displays the BumpMap dialog, or does it simply apply the effect? And are you using that code in a VBA macro or a VSTA Addin?

Last edited by drawken; 11-04-2011 at 01:00.
Reply With Quote
  #7  
Old 11-04-2011, 12:06
shelbym's Avatar
shelbym shelbym is offline
Senior Member
 
Join Date: Nov 2002
Location: Cheyenne, WY
Posts: 1,769
Blog Entries: 9
Send a message via ICQ to shelbym Send a message via AIM to shelbym Send a message via MSN to shelbym Send a message via Yahoo to shelbym
Default Bump-map

Hey Ken,

I used VBA, no it does not open the dialog, it just crashes the app. :-) I did test in X4 just to make sure I have my syntax correct and it does work there. (changing the path for X4)

So its not going to work as a workaround, since you get the same crash.

-Shelby
Reply With Quote
  #8  
Old 11-04-2011, 15:50
drawken
Guest
 
Posts: n/a
Default

Quote:
Originally Posted by shelbym View Post
I did test in X4 just to make sure I have my syntax correct and it does work there. (changing the path for X4)
When you ran it under X4, does that CorelScript function open the dialog or does it apply the effect without opening the dialog?

Quote:
Originally Posted by shelbym View Post
So its not going to work as a workaround, since you get the same crash.
I agree that it doesn't look hopeful, but what I still want to test is if opening the BumpMap dialog from within the VSTA Addin process will somehow prevent the crash.
Thanks for your input. I'll keep bashing away at this, but right now I'm at a complete dead end.
Reply With Quote
  #9  
Old 11-04-2011, 17:12
runflacruiser's Avatar
runflacruiser runflacruiser is offline
Senior Member
 
Join Date: Jun 2009
Location: Pigeon Forge, TN USA
Posts: 811
Default

Hi.
The feature does work for some. It would be great to find the common denominator. What makes it work for some but not others?
-John
Reply With Quote
  #10  
Old 11-04-2011, 17:26
drawken
Guest
 
Posts: n/a
Default

Quote:
Originally Posted by runflacruiser View Post
It would be great to find the common denominator.
From what I've seen in the forums, it appears to be limited to X5 on Win7. Not sure if 32- or 64- bit makes a difference. (I'm on Win7x64 with the crashes.)
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Open file dialog ager CorelDRAW/Corel DESIGNER VBA 11 04-12-2016 00:22
Open text edit dialog Albert CorelDRAW/Corel DESIGNER VBA 0 29-05-2009 08:40
Open & Save dialog of vista explorer by VBA aakkaarr CorelDRAW/Corel DESIGNER VBA 3 19-03-2009 05:23
open fill dialog diwin CorelDRAW/Corel DESIGNER VBA 2 21-05-2007 11:21
Open form when i open my template diltech CorelDRAW/Corel DESIGNER VBA 1 10-01-2005 16:46


All times are GMT -5. The time now is 03:35.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
Copyright © 2011, Oberonplace.com