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

How to handle ENTER

15 REPLIES 15
Reply
Message 1 of 16
sgrya1
514 Views, 15 Replies

How to handle ENTER

How do I handle an ENTER using an existing result?

Dim End1Options As PromptKeywordOptions = New PromptKeywordOptions("Start point condition [Pan/Continuous] <" & sEnd1Condition & ">:", "Pan Continuous")
Dim End1Result As PromptResult = ed.GetKeywords(End1Options) Edited by: sgrya1 on Feb 20, 2010 12:47 AM
15 REPLIES 15
Message 2 of 16
sgrya1
in reply to: sgrya1

Dim End1Options As PromptKeywordOptions = New PromptKeywordOptions("Start point condition [Pan/Edge/Dead/Continuous] <">:", "Pan Edge Dead Continuous")
Dim End1Result As PromptResult = ed.GetKeywords(End1Options)
Message 3 of 16
sgrya1
in reply to: sgrya1

why doesn't my post inclide the existing variable?
Message 4 of 16
arcticad
in reply to: sgrya1

the *GreaterThan* and "LessThan* cause the text to disappear.
It's an old problem. Thanks Autodesk.
---------------------------



(defun botsbuildbots() (botsbuildbots))
Message 5 of 16
Anonymous
in reply to: sgrya1

See the 'Default' property of the Keyword collection.

--
http://www.caddzone.com

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

http://www.acadxtabs.com

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

wrote in message news:6340735@discussion.autodesk.com...
How do I handle an ENTER using an existing result?

Dim End1Options As PromptKeywordOptions = New
PromptKeywordOptions("Start point condition [Pan/Continuous] <" & sEnd1Condition
& ">:", "Pan Continuous")
Dim End1Result As PromptResult = ed.GetKeywords(End1Options)

Edited by: sgrya1 on Feb 20, 2010 12:47 AM
Message 6 of 16
sgrya1
in reply to: sgrya1

Hi,

I don't yet know how to access that. Is it something like

If End1Result = "" then
or
If End1Result = Keyword.Equals ??
or
If End1Result.Keyword =
Message 7 of 16
Anonymous
in reply to: sgrya1

Sorry, you need to learn to use the programming langauge.

This isn't the best place to do that.

--
http://www.caddzone.com

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

http://www.acadxtabs.com

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

wrote in message news:6340966@discussion.autodesk.com...
Hi,

I don't yet know how to access that. Is it something like

If End1Result = "" then
or
If End1Result = Keyword.Equals ??
or
If End1Result.Keyword =
Message 8 of 16
sgrya1
in reply to: sgrya1

It's a fairly common event in AutoCAD. Less common without a control to feed the KeyPress or Key down event handler.

I don't know .NET very well yet but this problem is still very applicable to this forum.
Message 9 of 16
sgrya1
in reply to: sgrya1

Dim EndOptions As PromptKeywordOptions = New PromptKeywordOptions("Start point condition [Pan/Continuous] <">:", "Pan Continuous")
EndOptions.AllowNone=True
Dim EndResult As PromptResult = ed.GetKeywords(EndOptions)

If EndResult.StringValue = "" Then

Be interested if it can be done as easily without using AutoCAD specific coding.
Message 10 of 16
Anonymous
in reply to: sgrya1

'This problem' is that you don't have the prerequisites, which is a reasonable
understanding of the programming language, and that is not applicable to this
forum.

I told you to set the 'Default' property of the KeywordCollection object
(accessed via the Keywords property of the PromptKeywordOptions object), and you
couldn't manage to figure that out.



--
http://www.caddzone.com

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

http://www.acadxtabs.com

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

wrote in message news:6341066@discussion.autodesk.com...
It's a fairly common event in AutoCAD. Less common without a control to feed the
KeyPress or Key down event handler.

I don't know .NET very well yet but this problem is still very applicable to
this forum.
Message 11 of 16
sgrya1
in reply to: sgrya1

Wasn't sure which property of which object you were talking about.
Could have been a bit clearer but instead decided to flame me for my ignorance and tell me to look elsewhere.

EndOptions.AllowNone=True

If EndResult.StringValue = "" Then
Message 12 of 16
NathTay
in reply to: sgrya1

You may feel like Tony is flaming you but he is giving you valuable advice.

You really do need to get a complete handle on the .NET Language you are using before attempting to use the AutoCAD .NET API.

This is the path I took when switching over from VBA and I know it has given me an advantage in learning to program with the AutoCAD .NET API over those that come here and Tony gives the same advice he is giving you.
Message 13 of 16
sgrya1
in reply to: sgrya1

I think it was reasonable query and the right place to post it.

A reply saying See the 'Default' property of the Keyword collection isn't very clear and not very helpful. Which property on which object?

.Net isn't that far different to VBA. I've almost transitioned a very large project with the aid of a few tutorials but there are just a few things I need help with.
Message 14 of 16
sgrya1
in reply to: sgrya1

Tony,

I've finally figured out what you were saying but a one line response could have saved a lot of grief and been very helpful.

End1Options.Keywords.Default = sEnd1Condition

By 'Default' I was thinking that there is a default settings for everyone of the properties. Not that there was a actual Default input setting for the Prompt which VBA didn't use.

I don't think I could have worked that one out without getting a clear explaination here.

Thanks.
Message 15 of 16
Anonymous
in reply to: sgrya1

{quote}

A reply saying See the 'Default' property of the Keyword collection isn't very
clear and not very helpful. Which property on which object?

{quote}

AFAIK, It was clear enough for any person of average intelligence.

--
http://www.caddzone.com

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

http://www.acadxtabs.com

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

wrote in message news:6341202@discussion.autodesk.com...
I think it was reasonable query and the right place to post it.

A reply saying See the 'Default' property of the Keyword collection isn't very
clear and not very helpful. Which property on which object?

.Net isn't that far different to VBA. I've almost transitioned a very large
project with the aid of a few tutorials but there are just a few things I need
help with.
Message 16 of 16
sgrya1
in reply to: sgrya1

Now that I understand that default was used as a noun and not an adjective I see it too. Edited by: sgrya1 on Feb 22, 2010 12:58 PM

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