Cancel
Showing results for 
Search instead for 
Did you mean: 

Regarding Segment table

Creator
Creator

Hello,

 I have few questions regarding the post made here https://community.plm.automation.siemens.com/t5/Plant-Simulation-Forum/Line-editing-the-segmente-tab... as I'm a new user and also want to edit segment table to dynmaically import line and read the customised segment table. 

1. I don't know how can one make a segment table before having a 'line'. All I know is if we have a 'line' we can edit its segment table. But my task is that I have a data of conveyor belt in Excel format and I have to import this table and make a 'line' according to dimensions here in the table.

2. I saw he used this .Models.Frame.Line.CornerPoints.writeRow(1,3,820,240,20,-1.5707963267949,140); . As I'm a new user I tried to write .models.frame.line. and then pressed ctrl+space, still I didn't get any option/method/attribute as cornerpoints.writerow nor I see this attribute/ method after I press F8 when i click 'line'. So my question is how can one know what all can he do after creating a 'line'? 

3. Also in the parameter which we see in the segment table of a line; when we try to edit  the last three rows of positions, it can't be edited in the segment table which determine positions. So how can one do it?

 

 

Also,

I read from @Steffen_B's book how to connect line from predecessor object to successor object, but that would be a colinear line. What if I have to make a turn of my conveyor belt in between.

As for eg. three objects are there P, Q, R. And a 'line' can be drawn from P to Q and P to R but I don't want it to be straight as in reality that wont be the case. So I need a 'line' going horizontal straight from P to some distance and then take left and right to an equal distance respectively and then take right and left to reach Q and R respectively.

I can do it by hand I know with the help of a curve or by skillful manipulation but I need P - Q - R to be connected via programming in 'method' or dynamically created by importing a data.

2 REPLIES

Re: Regarding Segment table

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

 there are no cornerpoints in the line.

You can use the segmentsTable command to read and write an old version of the segments table of the line (this function is still available and I hope, it will be there also in the next versions).

As a first step you need to create a line (at your first coordinate --> createObject). The line will have a standard length (from the class). The segements table will have initially two entries, the second entry is your second coordinate (you need to change x and y). For the third and all other segments of your line you need to include new lines into the segements table and set x and y.

If you have coordinates e.g. in meters, you need to calculate pixels from it (you need to set the coordinates in pixels --> see attribute scalingFactor)

 

This was the code snipped from the post.

 

is
  t:table;
do
t:=line.segmentsTable;
t.maxYDim:=t.yDim+1;
--write your data

--re-assign the segments table
line.segmentsTable:=t;



end;

Steffen Bangsow
freelance simulation specialist  
web: www.bangsow.eu
mail: steffen@bangsow.net

Re: Regarding Segment table

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

see the example method createLine

Steffen Bangsow
freelance simulation specialist  
web: www.bangsow.eu
mail: steffen@bangsow.net