I have been trying to set up a macro for setting the layer to DIMS automatically when I invoke the dimlinear command as I am tired of creating dimensions in the wrong layer then inadvertently switching them off. I have searched this forum and found an old post that suggested, working through the CUI manager I substitute the original command:
^C^C_dimlinear
with this
^C^C_layer;set;DIMS;;_dimlinear
but it just ignores the layer change code and creates a dimension in the current layer.
Strangely, whatever I do, even deleting the -dimlinear part, it still creates a linear dimension! Surely it should just change the layer and then stop?
I then reset the Linear dimension back to what I started with (i.e. ^C^C_dimlinear) and created a new command button with
^C^C_layer;set;DIMS;;_dimlinear
and it worked. But I don't wish to have to create a new command button for every dimensional feature (dim linear, dim aligned, leader etc)
Does anyone know why the programme won't let me override the original command?
cheers
rhoscadman
Hello rhoscadman,
For your information, in AutoCAD Mechancial, there's a feature called "Automatic Property Management".
Automatic Property Management refers to the process where every AutoCAD Mechanical command checks a group of settings known as the Object Property Settings and honors them during execution. This enables each command to be “aware” of the other commands and intelligently react to objects in the drawing area. So if you use power dimension commands to place dimension, those dimensions will be placed on the layers you specified in Object Property Settings dialog. The default layer for dimension is AM_5.
For more information, you can refer the help page.
Thanks Micheal, I tried as you suggested, but I still could not manipulate a macro to do as I require. Even After unticking that box.
Thanks Anyway.
BTW I tried the macro on a version of Autocad LT (2012), and it still wouldn't work.
Ok, I was just providing a existing way that is already available in AutoCAD Mechanical to do layer assignment automatically when you place dimension so you don't have to do macro in AutoCAD.
So going back to your question, the dimension say "_dimlinear" is a build-in command. I am afraid that you cannot override it. The thing that you can override is changing the macro corresponding to the button you are trying to click. For example, if you change the macro for linear dimension in CUI and apply it there, then you should be able to invoke the macro by clicking the button in the ribbon or toolbar.
Hi Michaelsu,
Kindly provide the command name to open object property setting dialogue box. i tried by refer the command list and unable to find.
Suresh
Hi,
i got the answer. AMOPTIONS=>AM:Standard=>double click ISO=>Object property setting dialogue box will open.
Suresh
Good to know you find it.