DataJuggler 0 Posted July 7, 2020 Report Share Posted July 7, 2020 (edited) The compile message made it easy enough to figure this out, but just to make it easier on the next person: Tutorial Part I - Simple has this example after you remove the default script code and modify it. Line 4: Rectangle selection = EnvironmentParameters.GetSelection(src.Bounds).GetBoundsInt(); When you build you get a warning this is obsolete and no longer needed, use GetSelectionAsPdnRegion So it should be changed to this I think: Rectangle selection = EnvironmentParameters.GetSelectionAsPdnRegion().GetBoundsInt(); In case the next person reading is new to C# / programming it might confuse them. Edited July 7, 2020 by DataJuggler Quote Link to post Share on other sites
toe_head2001 1,789 Posted July 7, 2020 Report Share Posted July 7, 2020 5 minutes ago, DataJuggler said: So it should be changed to this I think ... If you just want the bounding Rectangle, and don't need the PdnRegion: Rectangle selection = EnvironmentParameters.SelectionBounds; Quote My Gallery | My Plugin Pack Layman's Guide to CodeLab Link to post Share on other sites
DataJuggler 0 Posted July 7, 2020 Author Report Share Posted July 7, 2020 30 minutes ago, toe_head2001 said: If you just want the bounding Rectangle, and don't need the PdnRegion: This is why as soon as I go back to work I may donate and request the old docs be updated. Even thought its a pain, otherwise new people learn it wrong, and if they don't come find someone to inform them, it stays wrong. Thank you, 30 minutes ago, toe_head2001 said: Rectangle selection = EnvironmentParameters.SelectionBounds; Quote Link to post Share on other sites
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.