Author Topic: Civil 3D Styles | Multiple Client Standards  (Read 7214 times)

0 Members and 1 Guest are viewing this topic.

BlackBox

  • King Gator
  • Posts: 3770
Re: Civil 3D Styles | Multiple Client Standards
« Reply #15 on: March 29, 2012, 08:13:39 PM »
... if you can describe exactly what you'd need, and what Sincpac can't yet do, just let Sinc or I know and we'll see what we can muster up.

Here it goes....

First - If there's a simpler way of doing this, please feel free to point me in the right direction. I know little of working with Style Collection.

I am hoping to develop, or contribute towards, a WPF User Control, hosted within an AutoCAD Tool Palette (something which I've done before), that has three panes.

     -  My initial thought is for the panes to be tiled vertically, but one pane on top, and two splitting the bottom would work also, methinks.




First (left?) pane -
Will display the styles contained within the ActiveDocument's Style Collection, perhaps in a WPF TreeView that resembles that which is available from the Settings Tab of the Toolspace Palette.

Second (center?) pane -
Will display the layers associated with the selected style (from the left pane).

Third (right?) pane -
Will include a method for the user to specify a file from which to pull the 'incoming' layers which will replace those from the center pane. Perhaps this file to be selected will be .XML; of course that may be more complicated than simply parsing a .CSV, etc..

Once a valid file is selected, the right pane will display the layers contained, and the user can then, either via button, or drag and drop, 'replace' the layer(s) desired for those which make up the selected style.




Now.... Provided all of this doesn't sound like the outrageous forum request that I'm thinking it is, then I'd be happy to start the code for the WPF User Control, and AutoCAD Tool Palette as a shell in which to place the WPF TreeView.

After that is where I'm struggling - I know how to hard-code TreeViewItem(s), but I am not knowledgeable enough in .NET (yet) to iterate the style object itself, or the file's contents (especially if using XML), in order to populate the appropriate pane Objects.

Again, this seems too large of a request even to me, so no worries if you'd like to withdraw the request. I'd even be happy with some references to learn from, because I'm no where near as adept with .NET as I am with LISP. Thanks for your time and consideration!
"How we think determines what we do, and what we do determines what we get."

Jeff_M

  • King Gator
  • Posts: 4094
  • C3D user & customizer
Re: Civil 3D Styles | Multiple Client Standards
« Reply #16 on: March 29, 2012, 10:30:38 PM »
Yep, you're right, this is a bit ambitious for a forum request. When I suggested letting us know what was needed that Sincpac didn't already include, I had meant to infer that we could try to add that functionality to SincpacC3D. That being said, this also appears to be more of something that would likely not be used by a great many of us...limiting it's appeal to add to Sincpac. Since it sounds like you're willing to jump in and help with the coding, I'd be willing to help you out..time permitting. If this is something you need in a hurry, well, that may, or may not, be a factor in how you pursue this.

As far as reading/writing XML, it took me a while to learn this in .NET (and I'm far from proficient at it...I still need to go back and look at example code to figure out how to do things) but it's really fairly simple (not easy, simple) and fast.

Have you tried to use LayTrans? C3D styles should get their layers updated to the layers modified by LayTrans, but I have never even used LayTrans in a basic Autocad DWG. IOW, I'm not even sure how LayTrans works  :oops:

I'm unsure of your Second Pane....do you plan to go through the styles one by one to bring over the desired layer(s)?

Have you looked at SincpacC3D's CIVIL STYLE PROPERTIES command? This, or derivative of it, may be all you need....

I'll be out a good portion of tomorrow, but I should be around tomorrow evening and all day Saturday if you'd like to discuss further. You may also email me direct if desired, jeffm@quuxsoft.com

BlackBox

  • King Gator
  • Posts: 3770
Re: Civil 3D Styles | Multiple Client Standards
« Reply #17 on: March 30, 2012, 01:23:10 AM »
While the concept is ambitious for a forum request (thanks for being diplomatic), I do hope that it has not gone too far - I'm not expecting a finished product by any means.

I'm just really green when it comes to .NET, especially C# (I've mostly coded VB coming from Visual LISP's ActiveX API), and am plainly not yet familiar with C3D's Object Model the way I am with that of Land Desktop's. I've definitely got to give Kerry's 'getting started' thread a few reads! LoL

First and foremost, I'll actually try the LayTrans command, which is also something that I've never actually used, despite being loosly familiar with.

I appreciate your willingness to help, and will make an effort to refine the concept to one that may benefit a broader audience, than that of my specific situation. It's great to be able to learn from someone so knowledgeable.
"How we think determines what we do, and what we do determines what we get."

mjfarrell

  • Seagull
  • Posts: 14444
  • Every Student their own Lesson
Re: Civil 3D Styles | Multiple Client Standards
« Reply #18 on: March 30, 2012, 05:05:11 AM »
I have to wonder if LayerTrans will be all that is required?
Or even a combination of Layer Translation and Dwg standards checking *.DWS) files will be enough
to create a template in C3D the will comply entirely with the clients demands.

The items that concern me are more than just the font (text style) being used by label styles, but the content and formatting of those labels as well.

I don't recall any OOTB solution(s) that can chack and change that stuff.
Be your Best


Michael Farrell
http://primeservicesglobal.com/