- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello -
I am trying to call a command with CommandAsync and I keep getting an error. I need the code to keep running before the command finishes. I have been doing a lot of reading and trying different things but I'm stuck. This is what I am using:
ed.CommandAsync("Command","Parameter","Parameter")
it does what it is supposed to, but gives this exception after:
System.NullReferenceException: Object reference not set to an instance of an object.
at Autodesk.AutoCAD.EditorInput.Editor.CommandResult.Callback()
I get no error when I add "await" to the front
await ed.CommandAsync("Command","Parameter","Parameter")
But this makes the rest of the code not run until the command has finished, which isn't what I need. What am I missing here? Any help would be appreciated. Thanks in advance!
Solved! Go to Solution.