.NET

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

CommandFlags related (?) question

112 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 (112 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 (112 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

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community