Cs List: Difference between revisions

From Macros Wiki
Jump to navigationJump to search
ConnerO (talk | contribs)
New page: ! get CS list, add a CS and select it<br> <br> a1$ = "This macro will get a list of all CSs,"<br> a2$ = "create a new CS and select it."<br> <br> message "%a1$\n%a2$"<br> <br> check part_o...
 
ConnerO (talk | contribs)
No edit summary
Line 1: Line 1:
! get CS list, add a CS and select it<br>
|!&nbsp; &nbsp; &nbsp; get CS list, add a CS and select it
<br>
|-
a1$ = "This macro will get a list of all CSs,"<br>
|&nbsp;
a2$ = "create a new CS and select it."<br>
|-
<br>
|&nbsp;
message "%a1$\n%a2$"<br>
|-
<br>
|a1$ = "This macro will get a list of all CSs,"
check part_open, "You must have a part open to run this macro"<br>
|-
<br>
|a2$ = "create a new CS and select it."
get_cs_list<br>
|-
<br>
|
inum = number_of_css<br>
|-
if inum<1 then stop "No CS found"<br>
|message "%a1$\n%a2$"
<br>
|-
if inum>20 then inum = 20  ! just display data for the first 20<br>
|
<br>
|-
a$ = "Number of CSs = %inum\n"<br>
|check part_open, "You must have a part open to run this macro"
<br>
|-
for i=1 to inum<br>
|
:n = next_cs_number<br>
|-
:get_cs_name n, cs$<br>
|get_cs_list
:get_cs_spindle n, ispin<br>
|-
<br>
|
:a$ = a$ + "\n" + format$(n, "###0") + " " + cs$<br>
|-
:a$ = a$ + " : spindle "+format$(ispin,"0")<br>
|inum = number_of_css
next i<br>
|-
<br>
|if inum<1 then stop "No CS found"
a$ = a$ + "\n\nAdd a new one ?"<br>
|-
<br>
|&nbsp;
yesno a$, iyesno<br>
|-
if iyesno=0 then stop "Finished"<br>
|if inum>20 then inum = 20||   ! just display data for the first 20
<br>
|-
new_cs 3P, "Macro CS", 0, 0, 0, 1, 0, 0, 0, 1, 1<br>
|&nbsp;
ics = CsNumber<br>
|-
<br>
|a$ = "Number of CSs = %inum\n"
set_cs ics<br>
|-
update_cs_window<br>
|&nbsp;
<br>
|-
a$ = "Created new CS, number " + format$(ics, "###0") + " = 'Macro CS'"<br>
|for i=1 to inum
<br>
|}
stop "Finished\n"+a$<br>
:n = next_cs_number
 
:get_cs_name n, cs$
 
:get_cs_spindle n, ispin
 
 
 
:a$ = a$ + "\n" + format$(n, "###0") + " " + cs$
 
:a$ = a$ + " : spindle "+format$(ispin,"0")
{|
|next i
|-
|&nbsp;
|-
|a$ = a$ + "\n\nAdd a new one ?"
|-
|&nbsp;
|-
|yesno a$, iyesno
|-
|if iyesno=0 then stop "Finished"
|-
|&nbsp;
|-
|new_cs 3P, "Macro CS", 0, 0, 0, 1, 0, 0, 0, 1, 1
|-
|ics = CsNumber
|-
|&nbsp;
|-
|set_cs ics
|-
|update_cs_window
|-
|&nbsp;
|-
|a$ = "Created new CS, number " + format$(ics, "###0") + " = 'Macro CS'"
|-
|&nbsp;
|-
|stop "Finished\n"+a$

Revision as of 14:47, 29 July 2010

|!      get CS list, add a CS and select it |- |  |- |  |- |a1$ = "This macro will get a list of all CSs," |- |a2$ = "create a new CS and select it." |- | |- |message "%a1$\n%a2$" |- | |- |check part_open, "You must have a part open to run this macro" |- | |- |get_cs_list |- | |- |inum = number_of_css |- |if inum<1 then stop "No CS found" |- |  |- |if inum>20 then inum = 20||  ! just display data for the first 20 |- |  |- |a$ = "Number of CSs = %inum\n" |- |  |- |for i=1 to inum |}

n = next_cs_number
get_cs_name n, cs$
get_cs_spindle n, ispin


a$ = a$ + "\n" + format$(n, "###0") + " " + cs$
a$ = a$ + " : spindle "+format$(ispin,"0")
next i
 
a$ = a$ + "\n\nAdd a new one ?"
 
yesno a$, iyesno
if iyesno=0 then stop "Finished"
 
new_cs 3P, "Macro CS", 0, 0, 0, 1, 0, 0, 0, 1, 1
ics = CsNumber
 
set_cs ics
update_cs_window
 
a$ = "Created new CS, number " + format$(ics, "###0") + " = 'Macro CS'"
 
stop "Finished\n"+a$