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

Keyword dropdown list

7 REPLIES 7
Reply
Message 1 of 8
SRSDS
954 Views, 7 Replies

Keyword dropdown list

Is there a way to force enable the PromptKeywordOptions dropdown list that appears in the drawing pane of newer versions of AutoCAD?

 

For some reason it appears on some cases and not others. Exactly the same code and I can't figure out why it dosn't.

 

Also, some of our computers don't seem display the dropdown list at all. Not the right forum but is there a manual setting to enable that?

7 REPLIES 7
Message 2 of 8
Hallex
in reply to: SRSDS

Check displaymode variables in there,
just from the top of head, sorry
_____________________________________
C6309D9E0751D165D0934D0621DFF27919
Message 3 of 8
SRSDS
in reply to: Hallex

I think I've worked out the issue.

 

It isn't displaying the list is when it is triggered within a reactor and within a transaction.

It seems to work within a reactor but outside a transaction. I'll have to stop and start the transaction each side of the prompts.

 

If there is a fix to this it would be great though.

Message 4 of 8
Hallex
in reply to: SRSDS

I have an idea about

Declare variable outside of you command scope,say as member of your class, then use:

ed.PromptedForKeyword

to set value of this variable

Not tested just from the top of my head

_____________________________________
C6309D9E0751D165D0934D0621DFF27919
Message 5 of 8
DiningPhilosopher
in reply to: SRSDS

What is the purpose of prompting for input from within a reactor callback (which is quite dangerous, and really should be avoided). ?
Message 6 of 8
SRSDS
in reply to: DiningPhilosopher

I've discovered that you can't have transactions in some reactors like ObjectErased, ObjectAppeneded .

 

CommandStarted, CommandEnded, ImpliedSelectionChanged InitializeActive Document is fine.

It would be  handy if someone could list which ones to avoid.

 

Doesn't seem like it's dangerous. 

 

The problem of missing dropdown lists is also happening within control reactors within palette containers.

So it's a problem with reactors in general.

Message 7 of 8
SRSDS
in reply to: SRSDS

Sorry..It's not the transactions within a reactor that are a problem. It's the e.GlobalCommandName = "GRIP_STRETCH" reactor.

 

The dropdown list is there because it flashes for a split second after a response is made but for some reason it's being hidden.

 

 

Message 8 of 8
DiningPhilosopher
in reply to: SRSDS


@SRSDS wrote:

I've discovered that you can't have transactions in some reactors like ObjectErased, ObjectAppeneded .

 

CommandStarted, CommandEnded, ImpliedSelectionChanged InitializeActive Document is fine.

It would be  handy if someone could list which ones to avoid.

 

Doesn't seem like it's dangerous. 

 


 

That's only because you haven't bothered to test your code with those things that it can affect.  The wishful-thinking approach where you don't really test your code at all, or thorougly, will only lead to you having to throw it all out and start over from scratch.  Handling all of those events and doing things in them that take significant time will cause AutoCAD to run like a snail, and you've obviously not realized that yet.

 

Try undoing/redoing things after your event handlers kick in, and you might find that you've disabled REDO or otherwise caused the undo mechanism to not behave correctly.

 

The StartOpenCloseTransaction() method returns a transaction that can be used from events, but opening objects and doing things like getting user input from those events is going to ultimately fail.

 

Maybe I should't be telling you this, as the best lessons are the ones that come with some pain.

 

 

 

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