Nebeor Posted November 2, 2022 Share Posted November 2, 2022 Hello, Is there a way to make menu commands in the SDK that allow you to click after using the command on an object in the drawing to do something with it? In Vectorscript and Python I would use VS:TrackObject. I'm looking forward to your ideas! Quote Link to comment
JBenghiat Posted November 3, 2022 Share Posted November 3, 2022 ISDK::RunTempTool() will run a tool by command. You have to build your own VWExtensionTool, but that offers you complete flexibility with how the tool functions. Quote Link to comment
PatW Posted November 3, 2022 Share Posted November 3, 2022 I also see no other way than RunTemp tool. You pass in the IID like this: gSDK->RunTempTool( Your_VWExtensionToolClass::_GetIID()); You could write the data of the tool into a static class member that you acces then from the menu command or which is saver you finsih the job in the ::PointAdded method of the VWExtensionTool. Quote Link to comment
Nebeor Posted November 9, 2022 Author Share Posted November 9, 2022 @PatW I don't think that RunTempTool executes the tool immediately, but after the menu command has been finished. This is unusual to me compared to calling the reset of one parametric object to another parametric object using the SDK. I think to rather try to work with a callback method that I pass to the tool. Quote Link to comment
JBenghiat Posted November 9, 2022 Share Posted November 9, 2022 4 hours ago, Nebeor said: @PatW I don't think that RunTempTool executes the tool immediately, but after the menu command has been finished. This is unusual to me compared to calling the reset of one parametric object to another parametric object using the SDK. I think to rather try to work with a callback method that I pass to the tool. That's correct, RunTempTool() will send you away from the menu command, so any data that you need passed from the menu to the tool needs to be stored in wither static variables or written to saved settings. If you're doing something like collecting a point and returning to a dialog, you need to rebuild the dialog data after running the tool. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.