Recent Posts

Pages: [1] 2 3 ... 10
1
CAD General / Re: annotate "level"
« Last post by Krushert on Today at 08:07:04 am »
:-o

You only said that cause it mentioned mounting a bottom.  Or something like that...
Nope.  Good effort but wrong!
2
CAD General / Re: annotate "level"
« Last post by Greg B on Today at 08:01:05 am »
Bethrine,

What sort of beastie is this you're building ?
Ohhh Ohhh I know what it is!   

It is a Rewinder!   







It is a Rewinder for a Duck's Butt!

Something has to wind that waddle.  And Bethrine has the designed the new and improved Duck's Butt Rewinder 4000

 :-o

You only said that cause it mentioned mounting a bottom.  Or something like that...
3
In your 'radio' variable the order is:
Code: [Select]
(setq radio '("radio1" "radio2" "radioA" "radioB")In your dcl the order is:
"radioA", "radioB",  "radio1" and "radio2".

4
This is a strange bit of code:
Code: [Select]
(NTH (VL-POSITION "HELLO" MAINLST) MAINLST)If mainLst contains "HELLO" it will always return "HELLO".

i was playing around and just never fixed it before i posted it
i was trying to find the position of the word in a list and then use that nth in a selection set to entmod it.
5
.NET / Re: Font rendering in labels on Windows Forms
« Last post by huiz on Today at 07:39:27 am »
I didn't use the Font setting in the constructor, I don't have XP users and I have set Segoe UI in the Form Font, so it would not affect anything.

For Labels where I do not set the text alignment the flatstyle setting works great! Searching the internet gave me solutions like painting the text but that takes a lot of extra code to do, so just a setting is much easier. Thanks for that tip :-)

I already found other weird behaviors, like setting a label to white background color and disable it, then the forcolor becomes blue, whatever your color setting is.

Maybe it's time to seriously dive into WPF...
6
oops, I meant to say "install" on my previous message, not "unstall".

No worries.



But, I dropped it in the applications plugin folder.
Now, How do I use it?
It there a way of testing it, such as dropping

Code: [Select]
(foreach layout1 (layoutlist) (vla-SetActivePageSetup layoutname “pdf 24-36”))
on the command line?

You can test it at the command line, as you've noted above, so long as the named page setup exists within that drawing... Or you can paste same in VLIDE and you should see that the custom LispFunction Method is a 'native' function (unlike your own Defun, presuming you're not using Pragma on your custom LISP).
7
oops, I meant to say "install" on my previous message, not "unstall".
But, I dropped it in the applications plugin folder.
Now, How do I use it?
It there a way of testing it, such as dropping

(foreach layout1 (layoutlist) (vla-SetActivePageSetup layoutname “pdf 24-36”))

on the command line?
8
.NET / Re: Font rendering in labels on Windows Forms
« Last post by CADbloke on Today at 07:06:27 am »
But unfortunately I get another problem... The alignment of the text.  :(
Just for fun, the font change will mess with text spacing and layout.
Um, yeah, it breaks. After I discovered the Flatstyle thing I had to shuffle everything in my UI around a bit. Settle on a Font size first - I compared my window' fonts etc. to the Properties Palette in AutoCAD ie. I NETLOADed it and ran it.

You could perhaps set the default font size in the constructor after the Font = SystemFonts.MessageBoxFont; line. I selected all the controls and set their size in the Visual Studio GUI Properties palette. You could hand-edit the .Designer.cs file if you really feel like breaking it. It is about then that I thank $Deity for source control.
9
dear guys,
i'm helping some one to complete the routine with dialog,
there 4 radio bottons, here are some get_tile results: 0 & 1 to present action_tile
example:
------------
1 0
1 0
debug: (1 0 1 0) , ok

0 1
0 1
debug: (0 1 0 1) , ok

but,
1 0
0 1
becomes (0 1 1 0), should be (1 0 0 1)

0 1
1 0
becomes (1 0 0 1), should be (0 1 1 0)
why?

i use 2 variables: *pos* *key*, 4 button radio1, radio2, radioA, radioB
example: (action_tile "$radio" "(setq *pos* $value)"),
ie: *pos* for radio1 & radio2 , whereas *key* for  radioA, radioB

thanks guys. advise & comments are appreciated :)
Code: [Select]
;the slide can be downloaded here
http://www.cadtutor.net/forum/showthread.php?87818-A-lisp-need-some-modify./page2


  (if (null *fb_user*)
    (setq *fb_user* (mapcar 'itoa '(1 0 1 0)))
    ) ;_ end of if
(defun c:test (/ radio dcl_id path dcl)
  (setq radio '("radio1" "radio2" "radioA" "radioB" )
path  (getenv "temp")
)
 
  ('((f lst /)
     (setq f (open f "w"))
     (mapcar ''(($) (write-line $ f)) lst)
     (close f)
     (setq f nil)
     )
    (setq dcl (strcat path "\\tmp.dcl"))
    '("icon_fbox_img : image {"
      "        color                   = 0;"
      "        width                   = 40;"
      "        aspect_ratio            = 0.75;"
      "        allow_accept            = true;"
      "        fixed_height            = true;"
      "        fixed_width             = true;"
      "}"
      ""
      ""
      "fbox: dialog {"
      "\tlabel=\"Fillet Box settings\";"
      "        key = \"dcl_title\";"
      ""
      ": paragraph{"
      "        : text_part{"
      "\tlabel =\"Choose options \";"
      "\t//alignment = centered;"
      "}"
      "  }      "
      "        :column {"
      "                :row { "
      "                    :column {"
     
      "                      :icon_fbox_img {key = \"SH-CENTRE\";}"
      "                    }"
      "                    :column {             "
     
      "                      :icon_fbox_img {key = \"SH-EDGE\";}"
      "                    }"
      "                 }"
      "}"
      " :column{fixed_width=true;//alignment=centered;"
      " :boxed_radio_row{label=\"Draw method\";"
      "\t:radio_button{label=\"Pick centre                                         \";key=\"radioA\";}//value=\"0\";"
      "        :radio_button{label=\"Pick side                                       \";key=\"radioB\";}//value=\"1\""
      "}"
      "}"
      "           :column {"
      "                 :row { "
      "                    :column {"
     
      "                      :icon_fbox_img {key = \"SH-P2P\";}"
      "                    } "
      "                    :column {"
     
      "                      :icon_fbox_img {key = \"SH-C2C\";}"
      "                    }"
      "                 } "
      "        }"
      "        "
      "        spacer_1;"
      " :column{fixed_width=true;//alignment=centered;"
      " :boxed_radio_row{label=\"Mode\";"
      "           :radio_button{label=\"A:Edge to Edge                                 \";key=\"radio1\";}//value=\"0\""
      "           :radio_button{label=\"B:Radii to radii                               \";key=\"radio2\";}//value=\"1\";"
      "           }"
      "}"
      "        :column{fixed_width=true;alignment=centered;"
      "        : paragraph{"
      "        : text_part{"
      "\tlabel =\"Fillet box : hanhphuc 2014\";"
      "\talignment = centered;"
      "}"
      "  }      "
      "        :row {"
      " \t  spacer_0;"
      "           ok_cancel;"
      "        }"
      "}"
      "}"
      )
    )

  (setq dcl_id (load_dialog dcl))
  (new_dialog "fbox" dcl_id)
  (mapcar ''((a)
     ('((i sld)
(setq x (dimx_tile i))
(setq y (dimy_tile i))
(start_image i)
(fill_image 0 0 x y -2)
(slide_image 0 0 x y sld)
(end_image)
)
      a
      (strcat (strcat path "\\") a)
      )
     )
  sld
  ) ;_ end of mapcar
 
(if
   *fb_user*
    (mapcar 'set_tile
    radio
    (setq *fb_user* (apply 'append
   (list
(if (= *pos* "Centre")
   '("1" "0")
   '("0" "1")
   ) ;_ end of if

(if (= *key* "A")
   '("1" "0")
   '("0" "1")
   ) ;_ end of if
) ;_ end of list
   ) ;_ end of apply
  ) ;_ end of setq
    ) ;_ end of mapcar
    ) ;_ end of if
 
 (setq       
       *fb_user*
(mapcar ''((k a b) (action_tile k (strcat "(setq " a " \"" b "\" )")))
radio
'("*pos*" "*pos*" "*key*" "*key*")
'("Centre" "Edge" "A" "B")
) ;_ end of mapcar
       ) ;_ end of setq

 
  (action_tile "accept" "(setq *fb_user* (mapcar 'get_tile radio))
  (alert (strcat
   \"\nmethod: \"*pos* \"\nmode: \" *key* \"\n\"(vl-princ-to-string *fb_user*)))(done_dialog)")

  (start_dialog)
 
  (unload_dialog dcl_id)
  (princ)
  ) ;_ end of defun

;note: no *error* handler & lambda not optimized, just for debug
10
I think you have to use vla-insertinmenubar function

Thanks for your input kpblc .

You're right , but I wonder why , if I loaded the menu manually with the use of the command loadmenu it works , but in lisp routine it does not work as shown in the codes above !

Pages: [1] 2 3 ... 10