i'm looking for a way to insert a block and then insert another block 90 degrees from the insertion point of the first block and a distance specified in a dialog box.
(setq pt1 (getpoint "\nPick Insertion point:"))
(command "insert" "225" PT1 "" "" "")
(setq pt2 (get_tile "lb_notes")------------ here is where i get lost....the user specifies a distance in feet in a dialog box then i want to take that distance and insert another block 90 degrees away from the first block (if (eq ant "ant1")(command "insert" "blocks/panels" pt2 "" "" "")) (if (eq ant "ant2")(command "insert" "blocks/panels2" pt2 "" "" ""))
any help would be great,
thanks in advance
Here are the files
(defun C:lattice ;define function
(setq dcl_id (load_dialog "lattice.dcl")) ;load dialogue (if (not ;test if loaded (new_dialog "lattice" dcl_id) ;new dialogue ) ;end not (exit) ;if not loaded, exit )
(action_tile
"200"
"(setq TWR \"TH\")"
)
(action_tile
"225"
"(setq TWR \"TH2\")"
)
(action_tile
"250"
"(setq TWR \"TH3\")"
)
(action_tile
"om"
"(setq ANT \"ANT1\")"
)
(action_tile
"pn"
"(setq ANT \"ANT2\")"
)
(action_tile
"accept" ;if OK selected
"(done_dialog)" ;*close dialogue, set flag
)
(action_tile
"cancel" ;if Cancel selected
"(setq TWR nil)(done_dialog)"
)
(start_dialog)
(unload_dialog dcl_id)
(if (eq TWR "TH")
(do_200)
)
(if (eq TWR "TH2")
(do_225)
)
(if (eq TWR "TH3")
(do_250)
)
(princ)
)
(defun do_200
(setq pt1 (getpoint "\nPick Tower Insertion point:"))
(COMMAND "insert" "Blocks/TOWERS/LATTICE200" PT1 "" "" "") (if (eq ANT "ANT1") (COMMAND "insert" "Blocks/TOWERS/ANT-PANELS" PT1 "" "" "") ) (if (eq ANT "ANT2") (COMMAND "insert" "Blocks/TOWERS/ANT-PANELS2" PT1 "" "" "") )
)
(defun do_225
(setq pt1 (getpoint "\nPick Tower Insertion point:"))
(COMMAND "insert" "Blocks/TOWERS/LATTICE225" PT1 "" "" "") (if (eq ANT "ANT1") (COMMAND "insert" "Blocks/TOWERS/ANT-PANELS" PT1 "" "" "") ) (if (eq ANT "ANT2") (COMMAND "insert" "Blocks/TOWERS/ANT-PANELS2" PT1 "" "" "") )
)
(defun do_250
(setq pt1 (getpoint "\nPick Tower Insertion point:"))
(COMMAND "insert" "Blocks/TOWERS/LATTICE250" PT1 "" "" "") (if (eq ANT "ANT1") (COMMAND "insert" "Blocks/TOWERS/ANT-PANELS" PT1 "" "" "") ) (if (eq ANT "ANT2") (COMMAND "insert" "Blocks/TOWERS/ANT-PANELS2" PT1 "" "" "") )
)
lattice: dialog { //dialogue name
label = "Lattice Tower"; //label
: radio_button { //*radio button
label = "200'-0"; //*label
key = "200"; //*key
} //*end radio button
: radio_button { //*radio button
label = "225'-0"; //*label
key = "225"; //*key
} //*end radio button
: radio_button { //*radio button
label = "250'-0"; //*label
key = "250"; //*key
} //*end radio button
} //*end radio column
:boxed_radio_column{ //radio column
label = "Antenna Type" ; //label
: radio_button { //*radio button
label = "Omni"; //*label
key = "om"; //*key
}
: radio_button { //*radio button
label = "Panel"; //*label
key = "pn"; //*key
} //*end radio button
} //*end radio column
} //*end row
: edit_box {
label = "Rad Center:";
key = "eb_note";
horizontal_alignment = left;
}
:spacer { width = 1;} //*spacer
ok_cancel ; //OK/Cancel Tile
}
}
}
(setq pt1 (getpoint "\nPick Insertion point:"))
(command "insert" "225" PT1 "" "" "")
(setq pt2 (get_tile "lb_notes")------------ here is where i get lost....the user specifies a distance in feet in a dialog box then i want to take that distance and insert another block 90 degrees away from the first block (if (eq ant "ant1")(command "insert" "blocks/panels" pt2 "" "" "")) (if (eq ant "ant2")(command "insert" "blocks/panels2" pt2 "" "" ""))
any help would be great,
thanks in advance
Here are the files
(defun C:lattice ;define function
(setq dcl_id (load_dialog "lattice.dcl")) ;load dialogue (if (not ;test if loaded (new_dialog "lattice" dcl_id) ;new dialogue ) ;end not (exit) ;if not loaded, exit )
(action_tile
"200"
"(setq TWR \"TH\")"
)
(action_tile
"225"
"(setq TWR \"TH2\")"
)
(action_tile
"250"
"(setq TWR \"TH3\")"
)
(action_tile
"om"
"(setq ANT \"ANT1\")"
)
(action_tile
"pn"
"(setq ANT \"ANT2\")"
)
(action_tile
"accept" ;if OK selected
"(done_dialog)" ;*close dialogue, set flag
)
(action_tile
"cancel" ;if Cancel selected
"(setq TWR nil)(done_dialog)"
)
(start_dialog)
(unload_dialog dcl_id)
(if (eq TWR "TH")
(do_200)
)
(if (eq TWR "TH2")
(do_225)
)
(if (eq TWR "TH3")
(do_250)
)
(princ)
)
(defun do_200
(setq pt1 (getpoint "\nPick Tower Insertion point:"))
(COMMAND "insert" "Blocks/TOWERS/LATTICE200" PT1 "" "" "") (if (eq ANT "ANT1") (COMMAND "insert" "Blocks/TOWERS/ANT-PANELS" PT1 "" "" "") ) (if (eq ANT "ANT2") (COMMAND "insert" "Blocks/TOWERS/ANT-PANELS2" PT1 "" "" "") )
)
(defun do_225
(setq pt1 (getpoint "\nPick Tower Insertion point:"))
(COMMAND "insert" "Blocks/TOWERS/LATTICE225" PT1 "" "" "") (if (eq ANT "ANT1") (COMMAND "insert" "Blocks/TOWERS/ANT-PANELS" PT1 "" "" "") ) (if (eq ANT "ANT2") (COMMAND "insert" "Blocks/TOWERS/ANT-PANELS2" PT1 "" "" "") )
)
(defun do_250
(setq pt1 (getpoint "\nPick Tower Insertion point:"))
(COMMAND "insert" "Blocks/TOWERS/LATTICE250" PT1 "" "" "") (if (eq ANT "ANT1") (COMMAND "insert" "Blocks/TOWERS/ANT-PANELS" PT1 "" "" "") ) (if (eq ANT "ANT2") (COMMAND "insert" "Blocks/TOWERS/ANT-PANELS2" PT1 "" "" "") )
)
lattice: dialog { //dialogue name
label = "Lattice Tower"; //label
label = "Select Height" ; //labelrow {
boxed_radio_column{ //radio column
: radio_button { //*radio button
label = "200'-0"; //*label
key = "200"; //*key
} //*end radio button
: radio_button { //*radio button
label = "225'-0"; //*label
key = "225"; //*key
} //*end radio button
: radio_button { //*radio button
label = "250'-0"; //*label
key = "250"; //*key
} //*end radio button
} //*end radio column
:boxed_radio_column{ //radio column
label = "Antenna Type" ; //label
: radio_button { //*radio button
label = "Omni"; //*label
key = "om"; //*key
}
: radio_button { //*radio button
label = "Panel"; //*label
key = "pn"; //*key
} //*end radio button
} //*end radio column
} //*end row
: edit_box {
label = "Rad Center:";
key = "eb_note";
horizontal_alignment = left;
}
:spacer { width = 1;} //*spacer
ok_cancel ; //OK/Cancel Tile
label = "GH 2003"; //textspacer { width = 1;} //*end radio column
paragraph { //begin paragraph
text_part { //a bit of text
}
}
}