removed command / broken macro

removed command / broken macro

Anonymous
Not applicable
1,307 Views
10 Replies
Message 1 of 11

removed command / broken macro

Anonymous
Not applicable

Hi all,

 

AutoCad removed a command a few years ago and it has affected a macro that I would use everyday.

Can someone suggest an alternative to this? The "DIM1" command used to work until 2016.

 

The macro looks like this

^C^C^P(command "dim1" "newtext" "<> VIF");^P

When you run the macro it updates selected dimensions to have VIF after the measurement.

 

0 Likes
1,308 Views
10 Replies
Replies (10)
Message 2 of 11

cadffm
Consultant
Consultant
0 Likes
Message 3 of 11

dbroad
Mentor
Mentor

Macros using AutoLISP that use "DIM1" should still work.  Pasting that into AutoCAD 2018, for example, works fine.  Which version are you having trouble with? Entering DIM1 at the command line will not work though.

Architect, Registered NC, VA, SC, & GA.
Message 4 of 11

Anonymous
Not applicable

This shouldn't involve AutoLISP unless I am just not aware of the connection?

We made a toolbar with different macro buttons to switch layers and other common simple commands

No lisp programs involved because some of us have the full version of AutoCad and some of us have LT which does not run LISP programs. 

I can manually, with the command bar, use these commands I just can't string them together for some reason.

- DIMEDIT

- NEW

- "PRESS END BUTTON AND SPACE" VIF

0 Likes
Message 5 of 11

Anonymous
Not applicable

Thanks for the link. It did get me places I am just stuck at the very end.

I can do these commands manually, in the command bar, but I can't string them together in a one button macro

-dimedit

-new

-"press end press space" VIF

0 Likes
Message 6 of 11

dbroad
Mentor
Mentor

This is in your original post in this thread

(command "dim1" "newtext" "<> VIF")

It is lisp (starting and ending with parentheses) and works as part of the macro.  Each text string after the function command is what you would type into the command line.  

The entire macro is put in your CUI:
^C^C^P(command "dim1" "newtext" "<> VIF");^P

 

For those who don't have LISP, I'm not sure how you would accomplish the same things without DIM1.

Architect, Registered NC, VA, SC, & GA.
0 Likes
Message 7 of 11

cadffm
Consultant
Consultant

Like dbroad wrote, thats lisp and that didn't work in LT, but it should working fine as menumacro (without Lisp) too.

(thank you @dbroad for the hint that the commands still working in automation)

 

@Anonymous

the command is working, so why do searching for an edit or workaround?

as simple menumacro for AutoCAd and ACAD LT

^C^C^P_dim1;_newtext;<> VIF;^P

Sebastian

0 Likes
Message 8 of 11

Anonymous
Not applicable

I am close but it is still not automatically adding "VIF" after my dimension.

I have to manually hit "end" "space" "VIF"

 

0 Likes
Message 9 of 11

Anonymous
Not applicable

To anyone who may be looking for the solution this is what I ended up with.

It may not be the cleanest, I'm no macro pro but hopefully this helps you.

 

^C^C_cmddia;0;_select;_auto;\_dimedit;new;<> VIF;_previous;;_cmddia;1;;;

Message 10 of 11

cadffm
Consultant
Consultant

So you have two solution, nice, happy for you (and others) Man Happy

(please also start the new option with the international call(_new), otherwise the others underscores make no sense)

Sebastian

0 Likes
Message 11 of 11

scot-65
Advisor
Advisor

@Anonymous wrote:

Hi all,

 

AutoCad removed a command a few years ago and it has affected a macro that I would use everyday.

Can someone suggest an alternative to this? The "DIM1" command used to work until 2016.

 

The macro looks like this

^C^C^P(command "dim1" "newtext" "<> VIF");^P

When you run the macro it updates selected dimensions to have VIF after the measurement.

 


Let's update you...

>> "updates selected objects"

command "-DIMSTYLE" "Apply" pause

 

Applying a value onto an existing object is one method.

Set environment first, then add a new object to the database is the other. When

finished, reset the environment. We will use a variation of this second method

to update a value of an existing dimension object.

 

In lieu of a text override, set DIMPOST, run command -DIMSTYLE and reset DIMPOST.

[to do a text override involves ENTMOD in LISP or use a VL method]

 

An alternate to resetting DIMPOST is to restore the dimension style.

All overrides will be removed.

This can be accomplished easily in LISP, don't know about LT.

Command "-DIMSTYLE" "Restore" (getvar 'DIMSTYLE).

 

For DIMPOST, to add a suffix, simply quote " VIF" (there is a space inside the quote).

The angles need not be present; but prefer showing them anyway.

To add a prefix, provide the angles in the suffix position "+/- <>".

 

I'll let you build the macro... for both LISP and LT...

 

???

 


Scot-65
A gift of extraordinary Common Sense does not require an Acronym Suffix to be added to my given name.

0 Likes