ILoveMadoka 发表于 2022-7-6 11:36:34

Request: Routint to turn off C

I'm sure I will be embarrassed at how simple this is but I do not know how to write a simple routine to pick a single dimension and have the center mark setting changed to None.
I have to do this often enough that I'd like to have a C:MO (Mark Off) command for this situation. 99% of the time I need the Center Mark on.
 
I know I can pick it from the Properties Dialog.
I just would like a routine for these instances.
 
TIA!!

nukecad 发表于 2022-7-6 11:52:49

Create a second dimstyle with no centre mark and use this when you need it?

ILoveMadoka 发表于 2022-7-6 11:58:33

I was hoping for a quicky two letter command if at all possible...

alanjt 发表于 2022-7-6 12:06:08

Would this work? Untested...
 

(defun c:TEst (/ #SS) (cond   ((setq #SS (ssget "_:L" '((0 . "DIMENSION"))))    (or *AcadDoc* (setq *AcadDoc* (vla-get-activedocument (vlax-get-acad-object))))    (vlax-for x (setq #SS (vla-get-activeselectionset *AcadDoc*))      (vl-catch-all-apply 'vla-put-centertype (list x acCenterNone))    ) ;_ vlax-for    (vl-catch-all-apply 'vla-delete (list #SS))   ) ) ;_ cond (princ)) ;_ defun

ILoveMadoka 发表于 2022-7-6 12:13:17

Works like a charm!
Exactly what I was hoping for!!
 
Thank you SO much!!!

ILoveMadoka 发表于 2022-7-6 12:23:06

I know a tiny bit about lisp but nothing about VLA.
Is is hard to code this in autolisp?
(I was just wondering how hard it would have been to code it in simple lisp)
(ie: How stupid am I really??!!)
 
If it's too much of a hassle, don't bother (it's works fine)
I'm just wondering from a "I'm trying to learn" standpoint..
 
thanks again either way!

Pablo Ferral 发表于 2022-7-6 12:34:48

Could you use the properties pallette?

mdbdesign 发表于 2022-7-6 12:37:07

^C^C_DIMCEN;0;^C^C_-dimstyle _apply \\^C^C_DIMCEN;0.09
 
Put this code into button, replace last #( in red) with your variable.
I know I am late but it is simple to understand.
页: [1]
查看完整版本: Request: Routint to turn off C