Message 1 of 26
Utility Classes - A Start

Not applicable
06-26-2007
09:03 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I was thinking about a form I am currently designing for a dialog that will allow the user to label coordinates in Model Space. I was thinking in particular about some controls that could probably take advantage of common code wrapped into a GUIHelper class.
I wanted to ask if someone might share the following code with me, if it is available.
[1] I need to fill a ListBox with all of the layers that exist in a drawing. I was thinking we could create a method that accepts a ListBox as an argument and then fills it with the existing Layers. If someone can share with me their code for accessing a list of existing layers in a drawing I will write the rest of the method and stick it in the GUIHelper class.
[2] I'm not sure how convoluted the logic is to display the Layer Dialog Box. If involves more that one or two method calls I thought we could wrap this in another method of the GUIHelper class. This will allow the button to show the dialog with a single call like helper.showLayerDialog(). Can anyone share with me the code needed to open the LayerDialog?
[3] I'll need to come up with a dialog that allows the configuration of MText entities that are created by some of my tools. (For example, the text containing the coordinate values of a selected point for my current tool.) I was wondering if we could come up with a standard dialog box and supporting classes that can be used for this purpose. If I design the code for this will someone review it and comment?
P.S. - I have set up a spot in my SVN repository at the SurveyOS SourceForge Project for my AutoCAD .NET code. I will release it under the GPL. As soon as I have some time I will post a link to the Project website, the repository, and instructions on how to contribute. I welcome other developers that would like to collaborate and share code to contact me about placing a module on the SVN.
Scott Huey Message was edited by: Sunburned Surveyor
I wanted to ask if someone might share the following code with me, if it is available.
[1] I need to fill a ListBox with all of the layers that exist in a drawing. I was thinking we could create a method that accepts a ListBox as an argument and then fills it with the existing Layers. If someone can share with me their code for accessing a list of existing layers in a drawing I will write the rest of the method and stick it in the GUIHelper class.
[2] I'm not sure how convoluted the logic is to display the Layer Dialog Box. If involves more that one or two method calls I thought we could wrap this in another method of the GUIHelper class. This will allow the button to show the dialog with a single call like helper.showLayerDialog(). Can anyone share with me the code needed to open the LayerDialog?
[3] I'll need to come up with a dialog that allows the configuration of MText entities that are created by some of my tools. (For example, the text containing the coordinate values of a selected point for my current tool.) I was wondering if we could come up with a standard dialog box and supporting classes that can be used for this purpose. If I design the code for this will someone review it and comment?
P.S. - I have set up a spot in my SVN repository at the SurveyOS SourceForge Project for my AutoCAD .NET code. I will release it under the GPL. As soon as I have some time I will post a link to the Project website, the repository, and instructions on how to contribute. I welcome other developers that would like to collaborate and share code to contact me about placing a module on the SVN.
Scott Huey Message was edited by: Sunburned Surveyor