Community
AutoCAD Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Action Macro not setting OSMode before inserting block

0 REPLIES 0
Reply
Message 1 of 1
finn.chappell
336 Views, 0 Replies

Action Macro not setting OSMode before inserting block

Ok, So i have been struggling with this for a while now and would appreciate any insight into this that I can get. I have been toying with creating Action macros to set an OSmode to start and then return to user preference at the completion of the macro.

 

Here is how I recorded the macro:


Command: _ACTRECORD

Command: *Cancel*

Command: SETVAR Enter variable name or [?] :

osmode Enter new value for OSMODE <16531>: 512

Command: LINE

Specify first point:

Specify next point or [Undo]:

Specify next point or [Undo]:

Command: SETOSMODE

nil

Command: '_ACTSTOP

 

I am using the Autocad variable UserI1 as my user preference variable so that the end user can set this variable in their Acaddoc and each time the macro is run it will return to their preference.  I have attached the Action Macro as well as the LSP file that defines C: SETOSMODE. The problem I am having is that the macro is not recognizing the first SetVar command and the nearest osnap is not being activated. The completion of the macro works well and returns the OSnaps to UserI1. But, for example, If I have Osnaps turned off and my UserI1 is set to 1 (endpoints), then the macro is run. There will be no OSnaps on during the creation of the line (in this example) but once completed the endpoints OSnap will turn on. If the command is then repeated, Endpoints will be activated throughout. 

 

If anyone could give me any help with this it would be unbelievably helpful, as I am having this problem with almost 100 macros that I have created. 

So It Goes...
0 REPLIES 0

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost