Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently October 9th, 2024, 2:18 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Changing Rectangle Width
PostPosted: February 26th, 2006, 11:56 am 
Offline

Joined: November 16th, 2004, 9:40 pm
Posts: 19
This is probably really simple, but I cant get it to work. I have drawn a rectangle which is x wide. I want to be able to write some script which will allow me to change just the width of the box to whatever I enter in an input box.

I have tried GetObjectDimensions() and SetObjectDimensions() but they only seem to allow you to copy all the dimensions of an existing object to another object.

Any ideas anyone. I use Opus Pro XE 5.5

Thanks


For this message kenkofi has been thanked by : mackavi


Top
 Profile  
 
 Post subject:
PostPosted: February 26th, 2006, 3:38 pm 
Offline

Joined: November 11th, 2004, 1:43 pm
Posts: 172
Location: Buckinghamshire, UK
for an object name box_marker, first get its current dimension data to an object toLocateTo
toLocateTo = box_marker.GetObjectDimensions()

change the item you want to change i.e. width

toLocateTo.width = set_to_width

Apply the new dimenstions to the object box_marker

box_marker.SetObjectDimensions(toLocateTo)


For this message eomc40 has been thanked by : mackavi


Top
 Profile  
 
 Post subject:
PostPosted: February 28th, 2006, 2:52 pm 
Offline

Joined: November 16th, 2004, 9:40 pm
Posts: 19
Hi there

Works perfectly thanks!!


For this message kenkofi has been thanked by : mackavi


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group