.NET

.NET

Reply
*James Allen
Post 21 of 36

Re: Wait for SendStringToExecute to complete

08-07-2009 03:17 AM in reply to: timbot
I believe COM's SendCommand will do what you want if you call it from an
application context command.
See:
http://discussion.autodesk.com/forums/message.jspa?messageID=6215733#6215733


--
James Allen
Malicoat-Winslow Engineers, P.C.
Columbia, MO



jta_albert wrote:
> Yep, thats bascially what I reliazed... (about the sendstring not executing untill later)
>
> I would like to stay away from storing and jumping in and out of the code.
>
> Do you know if there is any way to send to the command line and have it run in sync?
>
*Tony Tanzillo
Post 22 of 36

Re: Wait for SendStringToExecute to complete

08-07-2009 06:07 AM in reply to: timbot
http://www.caddzone.com/CommandLine.cs

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2009
Supporting AutoCAD 2000 through 2009

http://www.acadxtabs.com

Introducing AcadXTabs 2010:
http://www.caddzone.com/acadxtabs/AcadXTabs2010.htm

Email: string.Format("{0}@{1}.com", "tonyt", "caddzone");


wrote in message news:6232893@discussion.autodesk.com...
Yep, thats bascially what I reliazed... (about the sendstring not executing
untill later)

I would like to stay away from storing and jumping in and out of the code.

Do you know if there is any way to send to the command line and have it run
in sync?
*James Allen
Post 23 of 36

Re: Wait for SendStringToExecute to complete

08-07-2009 06:19 AM in reply to: timbot
Oh yeah, I'd start with Tony's class/method unless you need application
context.

--
James Allen
Malicoat-Winslow Engineers, P.C.
Columbia, MO



James Allen wrote:
> I believe COM's SendCommand will do what you want if you call it from an
> application context command.
> See:
> http://discussion.autodesk.com/forums/message.jspa?messageID=6215733#6215733
>
>
> --
> James Allen
> Malicoat-Winslow Engineers, P.C.
> Columbia, MO
Contributor
15 Posts
0 Kudos
Registered: ‎09-23-2008
Post 24 of 36

Re: Wait for SendStringToExecute to complete

08-07-2009 06:20 AM in reply to: timbot
Ok, a few questions about the thing i found on your web site. I've been trying to get autocad to zoom to a specific point based on what item is selected in a palette i'm making. the problem is that when i send my command it's .IsApplicationContext = True and returns 0. when i remove that code the command goes thru but nothing happens... i'm confused, it's returning like -5001 or something. but i can't find much information on the .IsApplicationContext = True or the code -5001. any help would be greatly appreciated!
*Tony Tanzillo
Post 25 of 36

Re: Wait for SendStringToExecute to complete

08-07-2009 12:35 PM in reply to: timbot
From what code are you calling it? A floating palette or modeless form?

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2009
Supporting AutoCAD 2000 through 2009

http://www.acadxtabs.com

Introducing AcadXTabs 2010:
http://www.caddzone.com/acadxtabs/AcadXTabs2010.htm

Email: string.Format("{0}@{1}.com", "tonyt", "caddzone");


wrote in message news:6233264@discussion.autodesk.com...
Ok, a few questions about the thing i found on your web site. I've been
trying to get autocad to zoom to a specific point based on what item is
selected in a palette i'm making. the problem is that when i send my command
it's .IsApplicationContext = True and returns 0. when i remove that code the
command goes thru but nothing happens... i'm confused, it's returning
like -5001 or something. but i can't find much information on the
.IsApplicationContext = True or the code -5001. any help would be greatly
appreciated!
Valued Contributor
75 Posts
0 Kudos
Registered: ‎01-10-2006
Post 26 of 36

Re: Wait for SendStringToExecute to complete

08-10-2009 02:50 PM in reply to: timbot
Thanks Tony, the CommandLine.cs was exactly what I needed.

Not sure I udnerstand how it works though...
Contributor
15 Posts
0 Kudos
Registered: ‎09-23-2008
Post 27 of 36

Re: Wait for SendStringToExecute to complete

08-13-2009 12:13 PM in reply to: timbot
floating palette
Valued Contributor
75 Posts
0 Kudos
Registered: ‎01-10-2006
Post 28 of 36

Re: Wait for SendStringToExecute to complete

08-15-2009 02:08 PM in reply to: timbot
Turns out I do need application context(or "CommandFlags.Session") if thats what you mean.

Does this not work in "Session" mode?

If not is there another way in "Session"mode?

Jon
Valued Contributor
75 Posts
0 Kudos
Registered: ‎01-10-2006
Post 29 of 36

Re: Wait for SendStringToExecute to complete

08-15-2009 02:24 PM in reply to: timbot
Hey Tony,

I ran into a problem using Commanline.cs in ApplicationContext.

Any help on using the command line in sync while in ApplicationContext(or "CommandFlags.Session" if I understand correctly)

Thanks,

Jon
*James Allen
Post 30 of 36

Re: Wait for SendStringToExecute to complete

08-16-2009 02:01 PM in reply to: timbot
Hi Jon,

Yes, that's what I meant, in which case COM's SendCommand should work.

See my first reply to you, one up from the one you replied to, and the
thread it links to for more details.

--
James Allen
Malicoat-Winslow Engineers, P.C.
Columbia, MO



jta_albert wrote:
> Turns out I do need application context(or "CommandFlags.Session") if thats what you mean.
>
> Does this not work in "Session" mode?
>
> If not is there another way in "Session"mode?
>
> Jon
>
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Are you interested in helping shape the future of the Autodesk Community? To participate in this brief usability study, please click here. Your time and input is greatly appreciated!