![]() |
|
#1
|
|||
|
|||
|
Anyone know how to programmatically open a PP X5 effects dialog box, specifically the "Bump Map" effect dialog?
|
|
#2
|
||||
|
||||
|
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 |
|
#3
|
|||
|
|||
|
Quote:
) 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. |
|
#4
|
|||
|
|||
|
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.... |
|
#5
|
||||
|
||||
|
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
|
|
#6
|
|||
|
|||
|
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. |
|
#7
|
||||
|
||||
|
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 |
|
#8
|
|||
|
|||
|
Quote:
Quote:
Thanks for your input. I'll keep bashing away at this, but right now I'm at a complete dead end.
|
|
#9
|
||||
|
||||
|
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 |
|
#10
|
|||
|
|||
|
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.)
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Open file dialog | ager | CorelDRAW/Corel DESIGNER VBA | 8 | 15-03-2012 23:16 |
| 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 |