Tobias Hauß Posted June 7, 2022 Share Posted June 7, 2022 Hi all, I would like to set the option "fit to objects" programmatically, but I couldn't find a SDK call. Is there a way to set this option programmatically? Thanks for any help. Tobias Quote Link to comment
Stefan Bender Posted June 7, 2022 Share Posted June 7, 2022 Maybe you can try virtual short VCOM_CALLTYPE ISDK::DoMenuName(const TXString& name, short chunkIndex) = 0; You need to know the universal name of the menu comand. I don't exactly know where you can find it, but maybe somewhere in Vectorworks.vwr. 1 Quote Link to comment
JBenghiat Posted June 7, 2022 Share Posted June 7, 2022 Otherwise, you probably have to use ISDK::ForEachObjectN to iterate over visible or selected objects, unite their bounding boxes, and then set the view the the bounding box plus a percentage. Quote Link to comment
Tobias Hauß Posted June 8, 2022 Author Share Posted June 8, 2022 (edited) Thanks for your answers! "gSDK->DoMenuName("Fit to Objects", 0);" does the trick. 😀 Edited June 8, 2022 by Tobias Hauß 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.