The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum for Programming
 LabTalk Forum
 change dimension units of created gobject
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

asenv

35 Posts

Posted - 10/12/2010 :  06:07:08 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release (Select Help-->About Origin): 8.1G SR3
Operating System: windows 2000 pro

Yet another question. I would like to know how can I change the units of already created gobject (graphical object)? I got experimetally that if I first set the units of the active layer then create the gobject it is created with the right dimension units like mm for example:


win -a Graph1;
Graph1!page.active = 3;
layer -u 4;
draw -n myRect -b;


The problem is that I am inserting a *.bmp graphic as gobject and this trick does not somehow work for it. It is created with pixels as dimension and in that way I can not place it relative to the axes (which are in mm at the moment).

image.filename$="D:\tmp\colormap.bmp";
image.import.object(Graph1,spectrumbmp,0);


Cheers
Asen

asenv

35 Posts

Posted - 10/12/2010 :  09:34:15 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Actually even the first method does not work. I got confused, because I have set manually the dimensions to mm, then restarted my script without restarting origin and then is the graphical object "myRect" in mm created.
Go to Top of Page

asenv

35 Posts

Posted - 10/12/2010 :  11:53:21 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
OK I found workaround myself, but it will be still good to know how is done that what I am asking.
The workaroung is that I set the layer in pixels
layer -u 5;
and then I set the dimensions and posiotion of my gobject. At the end I have to set the layer in mm back again.
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000