Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 08/19/2023 in all areas

  1. Not sure I like your formatting - personal preference but I don't like scrolling left to right... See below, replaced a lot of tabs with spaces and I find it easier to read. Also split up lines that contained for example "{row {column" What is it telling you when it doesn't launch or do anything? Are there any error messages? No error messages and the LISP is doing as you ask it to so there is another problem. Looking at re-fomatted DCL code, below, I have 2 spaces indenting for each { and back 2 spaces for each closing } . If there are matching pairs of { } then the last } should be indented 2 spaces in.... which it isn't - I think you have missed closing a column and boxed column? I find it helps to note what each closing bracket is for - just to to help me work it all out "MLStyle_Setting : dialog" "{" "initial_focus = \"Accept\";" "label = \"Setting mlines/Options hatch\";" "width = 45;" ": boxed_column {" " : column {" ": row {" ": text { label = \"Mline hatch\"; }" "}" ; end row ": row {" ": text { label = \"Layer\"; }" ": spacer { width = 7; }" ": popup_list { key = \"MLine_Layer\"; width = 22; }" "spacer_1;" ": popup_list { key = \"Hatch_Layer\"; width = 22; }" "spacer_1;" "}" ; end row ": row {" ": column { height = 5; fixed_height = true;" ": row {" ": text { key = \"MLStyle_Style\"; label = \"Style mline: \"; }" ": popup_list { key = \"MLStyles_List\"; edit_width = 20; list = \"Standard\"; value = \"0\"; allow_accept = true; }" "}" ; end row ": spacer { height = 0.01; }" ": row {" ": edit_box { label = \"Scanle mline: \"; key = \"Scale_Value\"; edit_width = 11; edit_limit = 12; value = \"\"; }" "}" ; end row ": spacer { height = 0.01; }" ": row {" " : column {" ": row {" ": popup_list { label = \"Osnap mline: \"; key = \"Justification_Value\"; edit_width = 10; list = \"\\nTop \\nCenter \\nBottom\"; value = \"\"; }" "}" ; end row ": spacer { height = 0.01; }" ": row {" ": toggle { label = \" Closed mline\"; key = \"Mline_Closed\"; value = \"0\";}}}}" "}" ; end row ": boxed_column { width = 24;" ": image_button { key = \"Mline_Preview\"; is_tab_stop = false; color = black; height = 4.7; fixed_height = true;}" "spacer_1;" "}" ; end boxed column "}" ; end row "spacer_1;" ": row {" ": text { key = \"Hatch_Selection\"; label = \"Hatch mline:end\"; fixed_width = true; width = 28; }" ": button { key = \"Hatch_Selection_Button\"; label = \"Option hatch\"; fixed_width = true; width = 1; height = 1; }" "spacer_0;" ; ": toggle { label = \" Enable hatch\"; key = \"enable\"; value = \"0\";}" "spacer_1;" "}" ; end row ": spacer { height = 0.01; }" "}" ; end row ": row { height = 3.5;" ": spacer { height = 2; width = 2; }" ": button { key = \"Accept\"; label = \"Ok\"; fixed_width = true; width = 10; height = 2; }" ": button { key = \"Cancel\"; label = \"Cancel\"; fixed_width = true; width = 10; height = 2; is_cancel = true; }" ": spacer { width = 1.5; }" "}" ; end row "errtile;" "}" ; end row
    1 point
  2. Did you Google ? Try "label pline sides Autocad lisp" big hint look for a version by Kent Cooper no need to write code.
    1 point
  3. Yeah, I thought of a similar solution as you, but I'm working with blocks. I need to create a function that converts that block into a set of points so I can maybe use a fence selection. I'm still mulling over this since I don't want to do exhaustive processing. What I'm thinking is something like this: (setq sel1 (LM:ss->ent sel)) (repeat (setq id1 (sslength sel)) (setq id1 (1- id1)) (setq ob1 (car (reverse sel1))) (setq sel1 (reverse (cdr (reverse sel1)))) ; remove the last entity from list (setq fpoints (fencepoints ob1)) ; generate fence points list for ssget (setq sel2 (ssget "_F" fpoints)) (setq sel2 (LM:ss->ent sel2)) (setq sel3 (and_list sel2 sel1)) ; reduces the list from sel2 to sel3 that only exists in sel1 (setq id2 -1) (repeat (length sel3) (setq ob2 (nth (setq id2 (1+ id2)) sel3) rtn (cons (MA:endptintersections ob1 ob2 tol) rtn ) ) ) (apply 'append (reverse rtn))
    1 point
×
×
  • Create New...