.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

CommandFlags related (?) question

2 REPLIES 2
Reply
Message 1 of 3
Anonymous
316 Views, 2 Replies

CommandFlags related (?) question


Hi all,

 

I need to make a command (which changes
database) that has some unusual properties:

 

1) can't be run by user from command window (can
get fired only by some other process)

2) can't get UNDOed

 

Is 1) possible at all?

 

Is 2) possible via certain CommandFlags
setting?

 

 

Regards,

Maksim Sestic

 
2 REPLIES 2
Message 2 of 3
Anonymous
in reply to: Anonymous

There's no CommandFlags for any of that.

Also, there's no way to prevent undoing a given
operation, without also preventing any previous
changes from also being undone.

You can use the Control option of the UNDO
command to disable and then immediately enable
undo, keeping in mind that it will prevent undoing
of all previous changes, not only those you want to
prevent the user from undoing.

If you are doing something when a drawing file is
first opened, before the user has a chance to make
any changes to the drawing, then the aforementioned
UNDO/Control hack is one way to prevent undoing of
changes that your initialization code does.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006/2007
http://www.acadxtabs.com

"Maksim Sestic" wrote in message news:5333873@discussion.autodesk.com...
Hi all,

I need to make a command (which changes database) that has some unusual properties:

1) can't be run by user from command window (can get fired only by some other process)
2) can't get UNDOed

Is 1) possible at all?

Is 2) possible via certain CommandFlags setting?


Regards,
Maksim Sestic
Message 3 of 3
Anonymous
in reply to: Anonymous


Thanks Tony, t
size=2>hat's what I found out for UNDO too.

 

I just didn't explain the reason for such strange
command behaviour. I had to make a command that gets fired out of Lisp script
(namely - acaddoc.lsp) as soon as drawing gets opened. It converts
drawing from version X to version Y of my application, changing DWG if
needed. I tried serveral things to make it work well out of managed assembly
responding to certain DocumentManager events, but that approach gets
tricky sometimes 🙂
Drawing conversion is
(naturally) UNDOable.

 

Regards,

Maksim Sestic

 


size=2>
 

 

 

There's no
CommandFlags for any of that.

Also, there's no way to prevent undoing a
given
operation, without also preventing any previous
changes from also
being undone.

You can use the Control option of the UNDO
command to
disable and then immediately enable
undo, keeping in mind that it will
prevent undoing
of all previous changes, not only those you want to

prevent the user from undoing.

If you are doing something when a
drawing file is
first opened, before the user has a chance to make
any
changes to the drawing, then the aforementioned
UNDO/Control hack is one way
to prevent undoing of
changes that your initialization code does.

--


size=2>http://www.caddzone.com



size=2>AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006/2007

href="http://www.acadxtabs.com">
size=2>http://www.acadxtabs.com



size=2>"Maksim Sestic" <

face=Verdana size=2>info@geoinova.com
>
wrote in message

face=Verdana size=2>news:5333873@discussion.autodesk.com

face=Verdana size=2>...
Hi all,
 
I need to make a command (which
changes database) that has some unusual properties:
 
1) can't be run
by user from command window (can get fired only by some other process)
2)
can't get UNDOed
 
Is 1) possible at all?
 
Is 2) possible
via certain CommandFlags setting?
 
 
Regards,
Maksim
Sestic

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

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost