Cancel
Showing results for 
Search instead for 
Did you mean: 

Ypos and Xpos issues after update

Pioneer
Pioneer

Dear all,

 

I have just updated PS from versions 14.0.2 to 14.1 and one of my methods has stopped working.

 

Now, when I try to run a code that changes the position of an object, I get the message "Object would be located outside of the frame".

 

I've tried:

      obj_TempConveyorProcess.Coordinate3D := ....

 

And
      obj_TempConveyorProcess.Ypos := ...
      obj_TempConveyorProcess.Xpos:= ...

 

None works.

 

Thanks for the support.

5 REPLIES

Re: Ypos and Xpos issues after update

Pioneer
Pioneer

So, after changing the axes origin, it works.

 

Still, can someone help with this? Is there a possible explanation?

Re: Ypos and Xpos issues after update

Siemens Phenom Siemens Phenom
Siemens Phenom

You actually found the explanation yourself - the axes origin influences the possible coordinate range.

 

You describe a typical problem that can happen in a 2D/3D model.

As long as you have a 2D-only or a 3D-only model, the world of object coordinates is pretty straight-forward:

2D works on pixel coordinates with minimum pixel coordinate values of 0. Typically, this restriction is clear to the user as long as only 2D is involved. To get more space Coordinate3d-wise in the upper left corner, you can change the axes origin.

3D works on tridimensional coordinates without limit.

Now, when you have a 2D/3D model, the 2D coordinate limit still has to apply but now, it might happen while you think you only work in a 3D environment.

This is the reason why, in recent versions, we no longer offer to create mixed 2D/3D models from scratch. You can still create them after the initial model creation by adding 3D visualization to a 2D model or vice versa but normally, this should not really be necessary.

Did you like the answer? Then click the Thumbs Up button.
Did the answer solve your problem? Then accept the answer as solution

Re: Ypos and Xpos issues after update

Pioneer
Pioneer

Hi Peter,

 

Thanks for the reply!

 

I understand what you are saying. However, I am using a 2D only model and it was working well before the update.

 

To give you more information, I am using a method to create a custome assembly line. This means that the method is deriving several objects from the Basis root, which are created at position AxesX0 and AxesY0. Then I am trying to move them, what gives the error.

 

When I change the AxesX0 to 100 and AxesY0 to 100, it works. When they are both set to 0, error.

Re: Ypos and Xpos issues after update

Siemens Phenom Siemens Phenom
Siemens Phenom

Hm, the restriction of the 2D pixel coordinates should basically check for 0 as the lowest possible pixel coordinate (in combination with the icon size, this could mean that an object might not be inserted in a more top-left position than, say, [10, 10]) and for, I believe, about 65000 as the highest possible pixel coordinate.

When you set them via XPos/YPos, you should directly see the values 2D checks against - when you set them via Coordinate3d, the axes origin comes into play - it is used to calculate one type of coordinates out of the other one.

Did you like the answer? Then click the Thumbs Up button.
Did the answer solve your problem? Then accept the answer as solution

Re: Ypos and Xpos issues after update

Pioneer
Pioneer

Hi Peter,

 

Yep, I understand that - it makes a lot of sense.

 

Just another thing, PS manages to create the objects at position 0, 0 and I can use my mouse to relocate them - but I can't do it via code (and this is what worked in the previous version). After changing the origin position, it works again.

 

The only thing I don't understand is why the same thing was working on versions 14.0.2 and it doesn't on 14.1. Something has definetly changed.

 

Well, but the point is that now the problem is solved.

 

Thanks for the help!