.NET

Reply
*Maksim Sestic
Message 1 of 3 (120 Views)

CommandFlags related (?) question

120 Views, 2 Replies
09-19-2006 07:44 AM

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

 
*Tony Tanzillo
Message 2 of 3 (120 Views)

Re: CommandFlags related (?) question

09-19-2006 09:52 PM in reply to: *Maksim Sestic
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
*Maksim Sestic
Message 3 of 3 (120 Views)

Re: CommandFlags related (?) question

09-20-2006 01:22 AM in reply to: *Maksim Sestic

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
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Are You Going To Be @ AU 2014? Feel free to drop by our AU topic post and share your plans, plug a class that you're teaching, or simply check out who else from the community might be in attendance. Ohh and don't forgot to stop by the Autodesk Help | Learn | Collaborate booths in the Exhibit Hall and meet our community team if you get a chance!