Debug Sel geo: Difference between revisions

From Macros Wiki
Jump to navigationJump to search
ConnerO (talk | contribs)
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...
 
ConnerO (talk | contribs)
No edit summary
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
! get gibbs geo ref numbers for each selected feature<br>
:!&nbsp; &nbsp; &nbsp; get gibbs geo ref numbers for each selected feature
{|
|get_num_feat_selected inum
|-
|if inum<1 then stop "No geometry selected"
|-
|&nbsp;
|-
|ics = 1  ! world units
|-
|&nbsp;
|-
|for i=1 to inum
|-
|}
:get_selected_geo_ref i, iref
<br>
<br>
get_num_feat_selected inum<br>
:get_feat_type iref, itype
if inum<1 then stop "No geometry selected"<br>
<br>
<br>
ics = 1   ! world units<br>
:get_feat_start iref, ics, xs, ys
:get_feat_end   iref, ics, xe, ye
<br>
<br>
for i=1 to inum<br>
:if itype=3 then get_circle_data iref, ics, rad, xc, yc
:get_selected_geo_ref i, iref<br>
<br>
<br>
:get_feat_type iref, itype<br>
:a$="feature number %i of %inum is ref %iref"
<br>
<br>
:get_feat_start iref, ics, xs, ys<br>
:if itype=1 then a$=a$+"\nPoint"
:get_feat_end  iref, ics, xe, ye<br>
: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 get_circle_data iref, ics, rad, xc, yc<br>
: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>
:a$="feature number %i of %inum is ref %iref"<br>
<br>
<br>
:if itype=1 then a$=a$+"\nPoint"<br>
:if itype=4 then a$=a$+"\nArc"
:if itype=1 then a$=a$+" X "+format$(xs, "####0.000")<br>
:if itype=4 then a$=a$+"\nXs "+format$(xs, "####0.000")
:if itype=1 then a$=a$+"  Y "+format$(ys, "####0.000")<br>
: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>
:if itype=2 then a$=a$+"\nLine"<br>
:message a$
:if itype=2 then a$=a$+"\nXs "+format$(xs, "####0.000")<br>
{|
:if itype=2 then a$=a$+"  Ys "+format$(ys, "####0.000")<br>
|next i
:if itype=2 then a$=a$+"\nXe "+format$(xe, "####0.000")<br>
|}
:if itype=2 then a$=a$+"  Ye "+format$(ye, "####0.000")<br>
<br>
:if itype=3 then a$=a$+"\nCircle"<br>
:if itype=3 then a$=a$+"\nXc "+format$(xc, "####0.000")<br>
:if itype=3 then a$=a$+"  Yc "+format$(yc, "####0.000")<br>
:if itype=3 then a$=a$+"  Rad "+format$(rad,"####0.000")<br>
<br>
<br>
:if itype=4 then a$=a$+"\nArc"<br>
:if itype=4 then a$=a$+"\nXs "+format$(xs, "####0.000")<br>
:if itype=4 then a$=a$+"  Ys "+format$(ys, "####0.000")<br>
:if itype=4 then a$=a$+"\nXe "+format$(xe, "####0.000")<br>
:if itype=4 then a$=a$+"  Ye "+format$(ye, "####0.000")<br>
<br>
  <br>
:message a$<br>
next i<br>

Latest revision as of 17:28, 13 August 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