OberonPlace.com Forums  

Go Back   OberonPlace.com Forums > Developer Forums > VBA > CorelDRAW/Corel DESIGNER VBA

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 14-04-2011, 02:03
grzjanik grzjanik is offline
Member
 
Join Date: Mar 2010
Location: Lodz, Poland
Posts: 86
Send a message via Skype™ to grzjanik
Default Lock shape area

Hi.

Looking for a macro that will keep an eye on the size of the area despite the changes to the size of any side.

Looking just like this:

Name:  Lock_shape_area.gif
Views: 921
Size:  20.0 KB

I'm using CorelDraw 12.

Thanks for any answers.

GrzJanik

Last edited by grzjanik; 14-04-2011 at 09:45.
Reply With Quote
  #2  
Old 14-04-2011, 07:04
runflacruiser's Avatar
runflacruiser runflacruiser is offline
Senior Member
 
Join Date: Jun 2009
Location: Pigeon Forge, TN USA
Posts: 811
Default

Hi.
I can't think of a way to do it live but calculations basing on a new entered width or height and the shapes current area should be easily doable using a proportion.
~John
Reply With Quote
  #3  
Old 14-04-2011, 09:50
grzjanik grzjanik is offline
Member
 
Join Date: Mar 2010
Location: Lodz, Poland
Posts: 86
Send a message via Skype™ to grzjanik
Default

Hi.
Thanks for replay.
But I would like for this to take place dynamically when you change the size of one of the sides. When I change the height to width let the match automatically.
GrzJanik.
Reply With Quote
  #4  
Old 16-04-2011, 19:48
shelbym's Avatar
shelbym shelbym is offline
Senior Member
 
Join Date: Nov 2002
Location: Cheyenne, WY
Posts: 1,791
Blog Entries: 15
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 Fixed Area

I wrote this one for X3, it may or may not work for 12. I did test it with X5, and it works fine, a few items could be improved but it is a starting point.

The code and a GMS is posted.

Fixed Area Macro

-Shelby
Reply With Quote
  #5  
Old 17-04-2011, 07:32
runflacruiser's Avatar
runflacruiser runflacruiser is offline
Senior Member
 
Join Date: Jun 2009
Location: Pigeon Forge, TN USA
Posts: 811
Default

Hi.
Pretty cool Shelby. I couldn't get it working on my rectangle until I converted to curves. Works ok but seems to get stuck sometimes when using handles.

It would be nice to see this work with all shapes such as irregular and circles.
~John
Reply With Quote
  #6  
Old 21-04-2011, 06:00
grzjanik grzjanik is offline
Member
 
Join Date: Mar 2010
Location: Lodz, Poland
Posts: 86
Send a message via Skype™ to grzjanik
Default

Hi!

Unfortunately, this macro does not work in Corel 12.
Does not report any errors, but nothing happens.
But thank you all for your reply.
I see that the Corel 12 is not possible to convert.

Regards.
~GrzJanik
Reply With Quote
  #7  
Old 21-04-2011, 13:52
shelbym's Avatar
shelbym shelbym is offline
Senior Member
 
Join Date: Nov 2002
Location: Cheyenne, WY
Posts: 1,791
Blog Entries: 15
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 Macro

If it is not working or giving an error you might need to uncheck the Delay VBA Load under customization. Restart CorelDRAW and try again.

-Shelby
Reply With Quote
  #8  
Old 26-05-2011, 01:30
grzjanik grzjanik is offline
Member
 
Join Date: Mar 2010
Location: Lodz, Poland
Posts: 86
Send a message via Skype™ to grzjanik
Default Unfortunately.

Thank you Shelby for trying to help, but the macro still does not work. It shows the following errors:




Excuse me, but I do not know what to do and how to fix.

Thanks for replay.

~GrzJanik
Reply With Quote
  #9  
Old 26-05-2011, 10:09
helpy
Guest
 
Posts: n/a
Default

First I made only a fast look on the code line, where the error occurs. And I thought, that it looks similar to an error, which I shortly run across. The solution for me was ==> changing the code line to:
Code:
set area = s.ObjectData("Area")
But then I tried it with a little sample and maybe the following is the solution:
Code:
area = s.ObjectData("Area").Value
If nothing helps I would insert the following code to check the types:
Code:
Debug.Print TypeName(area)
Debug.Print TypeName(s.ObjectData("Area"))
Debug.Print TypeName(s.ObjectData("Area").Value)
area = s.ObjectData("Area")
Hope this helps for finding a solution,
guido

Last edited by helpy; 27-05-2011 at 07:20.
Reply With Quote
  #10  
Old 27-05-2011, 09:52
grzjanik grzjanik is offline
Member
 
Join Date: Mar 2010
Location: Lodz, Poland
Posts: 86
Send a message via Skype™ to grzjanik
Default Still nothing.

Thanks for trying to help. Unfortunately, it is still the same error and same place. Can anyone suggest anything else?

Regards.

GrzJanik
Reply With Quote
Reply

Tags
area, lock, shape


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
Measuring area of basic shape in meters squared fungel General 6 03-03-2011 09:56
Cannot rotate a virtual shape with the same precision as a shape runflacruiser Macros/Add-ons 1 19-01-2011 14:34
How to get and set the status of CAPs Lock & Nums Lock aakkaarr CorelDRAW/Corel DESIGNER VBA 2 19-05-2010 16:59
Changing selection when two-shape group loses one shape Joe CorelDRAW/Corel DESIGNER VBA 1 19-02-2009 02:50
Lock an Object who ... Hernán General 2 08-04-2005 22:41


All times are GMT -5. The time now is 21:32.


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