Debug Sel geo: Difference between revisions
From Macros Wiki
Jump to navigationJump to search
New page: ! get gibbs geo ref numbers for each selected feature<br> <br> get_num_feat_selected inum<br> if inum<1 then stop "No geometry selected"<br> <br> ics = 1 ! world units<br> <br> for i=1 t... |
No edit summary |
||
| Line 1: | Line 1: | ||
! get gibbs geo ref numbers for each selected feature< | {| | ||
|! get gibbs geo ref numbers for each selected feature | |||
| | |||
|get_num_feat_selected inum | |||
|if inum<1 then stop "No geometry selected" | |||
| | |||
|ics = 1 ! world units | |||
| | |||
|for i=1 to inum | |||
|} | |||
:get_selected_geo_ref i, iref | |||
<br> | <br> | ||
:get_feat_type iref, itype | |||
<br> | <br> | ||
ics | :get_feat_start iref, ics, xs, ys | ||
:get_feat_end iref, ics, xe, ye | |||
<br> | <br> | ||
:if itype=3 then get_circle_data iref, ics, rad, xc, yc | |||
<br> | <br> | ||
: | :a$="feature number %i of %inum is ref %iref" | ||
<br> | <br> | ||
: | :if itype=1 then a$=a$+"\nPoint" | ||
: | :if itype=1 then a$=a$+" X "+format$(xs, "####0.000") | ||
:if itype=1 then a$=a$+" Y "+format$(ys, "####0.000") | |||
:if itype=2 then a$=a$+"\nLine" | |||
:if itype=2 then a$=a$+"\nXs "+format$(xs, "####0.000") | |||
:if itype=2 then a$=a$+" Ys "+format$(ys, "####0.000") | |||
:if itype=2 then a$=a$+"\nXe "+format$(xe, "####0.000") | |||
:if itype=2 then a$=a$+" Ye "+format$(ye, "####0.000") | |||
<br> | <br> | ||
:if itype=3 then | :if itype=3 then a$=a$+"\nCircle" | ||
:if itype=3 then a$=a$+"\nXc "+format$(xc, "####0.000") | |||
:if itype=3 then a$=a$+" Yc "+format$(yc, "####0.000") | |||
:if itype=3 then a$=a$+" Rad "+format$(rad,"####0.000") | |||
<br> | <br> | ||
<br> | <br> | ||
:if itype= | :if itype=4 then a$=a$+"\nArc" | ||
:if itype= | :if itype=4 then a$=a$+"\nXs "+format$(xs, "####0.000") | ||
:if itype= | :if itype=4 then a$=a$+" Ys "+format$(ys, "####0.000") | ||
:if itype=4 then a$=a$+"\nXe "+format$(xe, "####0.000") | |||
:if itype=4 then a$=a$+" Ye "+format$(ye, "####0.000") | |||
<br> | <br> | ||
<br> | <br> | ||
: | :message a$ | ||
{| | |||
|next i | |||
|} | |||
next i | |||
Revision as of 14:50, 29 July 2010
| ! get gibbs geo ref numbers for each selected feature | get_num_feat_selected inum | if inum<1 then stop "No geometry selected" | ics = 1 ! world units | for i=1 to inum |
- get_selected_geo_ref i, iref
- get_feat_type iref, itype
- get_feat_start iref, ics, xs, ys
- get_feat_end iref, ics, xe, ye
- if itype=3 then get_circle_data iref, ics, rad, xc, yc
- a$="feature number %i of %inum is ref %iref"
- if itype=1 then a$=a$+"\nPoint"
- if itype=1 then a$=a$+" X "+format$(xs, "####0.000")
- if itype=1 then a$=a$+" Y "+format$(ys, "####0.000")
- if itype=2 then a$=a$+"\nLine"
- if itype=2 then a$=a$+"\nXs "+format$(xs, "####0.000")
- if itype=2 then a$=a$+" Ys "+format$(ys, "####0.000")
- if itype=2 then a$=a$+"\nXe "+format$(xe, "####0.000")
- if itype=2 then a$=a$+" Ye "+format$(ye, "####0.000")
- if itype=3 then a$=a$+"\nCircle"
- if itype=3 then a$=a$+"\nXc "+format$(xc, "####0.000")
- if itype=3 then a$=a$+" Yc "+format$(yc, "####0.000")
- if itype=3 then a$=a$+" Rad "+format$(rad,"####0.000")
- if itype=4 then a$=a$+"\nArc"
- if itype=4 then a$=a$+"\nXs "+format$(xs, "####0.000")
- if itype=4 then a$=a$+" Ys "+format$(ys, "####0.000")
- if itype=4 then a$=a$+"\nXe "+format$(xe, "####0.000")
- if itype=4 then a$=a$+" Ye "+format$(ye, "####0.000")
- message a$
| next i |