<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Custom Subassemblies in Civil 3D Customization Forum</title>
    <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/custom-subassemblies/m-p/2889900#M20773</link>
    <description>&lt;P&gt;Yes, C# can be used just fine. The biggest drawback is, as you noted, that all the&amp;nbsp;Subassembly&amp;nbsp;examples are in VB.NET.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 22 Jan 2011 02:32:03 GMT</pubDate>
    <dc:creator>Jeff_M</dc:creator>
    <dc:date>2011-01-22T02:32:03Z</dc:date>
    <item>
      <title>Custom Subassemblies</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/custom-subassemblies/m-p/2889882#M20772</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm looking into figuring out custom subassembly programming, but I have a question that I've not had much luck figuring out the answer for searching on my own (largely due to the failings of the search feature of this forum)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is it possible to program subassemblies in C#?&amp;nbsp; I have a C++/Java background, and I would rather use a language that is similar to what I already know than having to look into visual basic.&amp;nbsp; All the example files for custom subassemblies are in VB.net so I don't think it would be terribly difficult to just use them as a base, but I just feel more comfortable in the land of braces and semicolons.&amp;nbsp; I know, crazy eh?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am just starting to get into .NET programming for AutoCAD, largely because my working environment has a huge lisp library to utilize so COM just ended up an easier (and I have gotten to the point where LISP is my most proficient language).&amp;nbsp; I guess if I was more familiar with .NET programming for AutoCAD, I probably would be able to answer my own question.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;BTW, Its hard to search for C# on these forums because # is ignored by the parser.&amp;nbsp; Argh.&lt;/P&gt;</description>
      <pubDate>Sat, 22 Jan 2011 01:04:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/custom-subassemblies/m-p/2889882#M20772</guid>
      <dc:creator>ryarmak</dc:creator>
      <dc:date>2011-01-22T01:04:59Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Subassemblies</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/custom-subassemblies/m-p/2889900#M20773</link>
      <description>&lt;P&gt;Yes, C# can be used just fine. The biggest drawback is, as you noted, that all the&amp;nbsp;Subassembly&amp;nbsp;examples are in VB.NET.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 22 Jan 2011 02:32:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/custom-subassemblies/m-p/2889900#M20773</guid>
      <dc:creator>Jeff_M</dc:creator>
      <dc:date>2011-01-22T02:32:03Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Subassemblies</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/custom-subassemblies/m-p/2889902#M20774</link>
      <description>&lt;P&gt;Alright.&amp;nbsp; Thank you much.. I'll see what I can figure out then.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 22 Jan 2011 02:33:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/custom-subassemblies/m-p/2889902#M20774</guid>
      <dc:creator>ryarmak</dc:creator>
      <dc:date>2011-01-22T02:33:35Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Subassemblies</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/custom-subassemblies/m-p/2890304#M20775</link>
      <description>&lt;P&gt;Check this out. I have been able to create subassemblies with ease.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="http://labs.autodesk.com/utilities/civil3d_subassembly_editor/" rel="nofollow" target="_blank"&gt;http://labs.autodesk.com/utilities/civil3d_subassembly_editor/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Bruce&lt;/P&gt;</description>
      <pubDate>Sun, 23 Jan 2011 16:12:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/custom-subassemblies/m-p/2890304#M20775</guid>
      <dc:creator>klugb</dc:creator>
      <dc:date>2011-01-23T16:12:35Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Subassemblies</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/custom-subassemblies/m-p/2925960#M20776</link>
      <description>&lt;P&gt;Well, going through tests with the subassembly composer, i found that it cannot make what we need.&amp;nbsp; There is no way to actually use offset/elevation target parameters, which I need.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I have been attempting to make a C# version of the base subassembly files that come with Civil3d, and have hit a snag with certain objects not being able to be cast properly even though the docs say that it should.&amp;nbsp; It seems Point3d cannot be cast to ParamPoint, and ParamPointCollection.Value(string) is returning a Point3d rather than a ParamPoint as the documentation states it should return.&amp;nbsp; It seems that using Add() rather than Value() will give me what I want, but it just seems odd to have to use an input method as a get method.&amp;nbsp; Somewhat frustrating, but if it works, it works.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I guess I will keep trudging along.&amp;nbsp; If anyone knows if the Subassembly Composer will eventually be updated for Target Parameters to work properly rather than just for surfaces, that would be great, then I wouldn't have to go through this mess.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Feb 2011 21:26:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/custom-subassemblies/m-p/2925960#M20776</guid>
      <dc:creator>ryarmak</dc:creator>
      <dc:date>2011-02-22T21:26:04Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Subassemblies</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/custom-subassemblies/m-p/2926158#M20777</link>
      <description>&lt;P&gt;But there are several subasemblies including generic subassemblies which can target offset/elevation.&lt;/P&gt;&lt;P&gt;Why don't you use them ?&lt;/P&gt;</description>
      <pubDate>Wed, 23 Feb 2011 00:41:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/custom-subassemblies/m-p/2926158#M20777</guid>
      <dc:creator>dnl999</dc:creator>
      <dc:date>2011-02-23T00:41:55Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Subassemblies</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/custom-subassemblies/m-p/2927122#M20778</link>
      <description>&lt;P&gt;I will look into seeing if there are existing subassemblies to do the job for me, but it hasnt been looking good.&amp;nbsp; Divided highways with a single centerline seem to be a big pain.&amp;nbsp; I am coming from an LDD background up to this point (our first civil 3d project here is a doozy), so I am used to just being able to draw exactly what we need, set a few points, attach a few alignments/profiles, and suddenly it works the way we need it for quantities.&amp;nbsp; I am frustrated that this is *NOT* how it works in civil 3d.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;From a programming background more than a manual drafting background, I tend to just program my way out of tight spots, which is why I went straight for custom subassemblies rather than frustratingly trying to sift through all of the existing stuff to hack something together than may work.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Feb 2011 17:26:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/custom-subassemblies/m-p/2927122#M20778</guid>
      <dc:creator>ryarmak</dc:creator>
      <dc:date>2011-02-23T17:26:43Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Subassemblies</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/custom-subassemblies/m-p/2964486#M20779</link>
      <description>&lt;P&gt;As it turns out, you cannot do subassemblies in C#.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I just rewrote a single subassembly (that I need a new version of, because the existing one is backwards in the way it uses attached slopes) in C#, along with all the helper functions.&amp;nbsp; In large part, it wasn't that bad, seeing that its really my first time using a .net language, the rewrite helped me get my bearings.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The one problem is, ParamPointCollection was not implemented in a way that you can access in C#.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In VB.Net, this is the code to grab a marked point from the collection:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;oParamPoint = oParamsPoint.Item(vMarkedPointName)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Which I believe should have this as a C# equivalent:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;oParamPoint = oParamsPoint[vMarkedPointName];&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Visual Studio auto-fill-in has an option for this, but as soon as it is finished typing, the autocompiler gives an error that type ParamPointCollection is unable to have the [] operator on it.&amp;nbsp; ParamPointCollection.Value(string index) returns a Point3d, which does not cast to ParamPoint in any reasonable way (and it gives basically no information either).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I mostly wanted to get this up there, so maybe someone will see it that may be able to get it put on a bug list or something... I will attempt to do what I need in vb.net, but kicking and screaming.&amp;nbsp; Luckily the only thing I really need is to change some variables sign to negative.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Mar 2011 20:25:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/custom-subassemblies/m-p/2964486#M20779</guid>
      <dc:creator>ryarmak</dc:creator>
      <dc:date>2011-03-24T20:25:43Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Subassemblies</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/custom-subassemblies/m-p/2964784#M20780</link>
      <description>&lt;P&gt;Would you be willing to post your code? Someone here may be able to suggest something other than VB&amp;nbsp;&lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://forums.autodesk.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Mar 2011 00:09:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/custom-subassemblies/m-p/2964784#M20780</guid>
      <dc:creator>Jeff_M</dc:creator>
      <dc:date>2011-03-25T00:09:12Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Subassemblies</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/custom-subassemblies/m-p/2965706#M20781</link>
      <description>&lt;P&gt;Sure.&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is basically the rewrite of the helper functions and one of the autodesk standard subassemblies.&amp;nbsp; I'm not sure about any code that deals with the [type]ParamCollections, as I think thats where things started to fall apart.&amp;nbsp;&amp;nbsp; But it compiled, and loaded into Civil3d.&amp;nbsp; I bet if I wasn't trying to connect to a marked point, it would have worked.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There are some bits that I know I would rewrite if I could get it to work in the first place, my personal coding style stems very much from my extensive lisp background so I really can't help but want to put a lot of small helper methods in whenever I have to write something more than twice (restrained myself when doing this test, only put in one extra method from before).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I did get this subassembly to work properly using vb.net, seeing that I only had to swap the signs for the slope inputs to get what we needed.&amp;nbsp; I am designing a truely custom subassembly right now, lots of prep work I am finding, very interesting!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If anyone figures this out, please share it back... I really really want to use C# rather than VB... I like my {}; and != ==.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Always, thanks for the help I've gotten on here!&lt;/P&gt;</description>
      <pubDate>Fri, 25 Mar 2011 17:27:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/custom-subassemblies/m-p/2965706#M20781</guid>
      <dc:creator>ryarmak</dc:creator>
      <dc:date>2011-03-25T17:27:05Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Subassemblies</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/custom-subassemblies/m-p/2966416#M20782</link>
      <description>&lt;P&gt;Well, not sure what's up with this, but C3D forces the name in the PointsParamCollection to upper case.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Changing this line:&lt;/P&gt;
&lt;P&gt;oParamPoint = oParamsPoint[vMarkedPointName];&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;to this:&lt;/P&gt;
&lt;P&gt;oParamPoint = oParamsPoint[vMarkedPointName.ToUpper()];&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;allows the code to complete. Although the results aren't what I'd expect...I didn't check the rest of the code, as that wasn't your question/comment of concern. I'm sure you'll get that part figured out now that it can run without error.&lt;/P&gt;</description>
      <pubDate>Sat, 26 Mar 2011 15:10:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/custom-subassemblies/m-p/2966416#M20782</guid>
      <dc:creator>Jeff_M</dc:creator>
      <dc:date>2011-03-26T15:10:24Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Subassemblies</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/custom-subassemblies/m-p/2967630#M20783</link>
      <description>&lt;P&gt;Really? I must be missing something because when I have oParamsPoint[vMarkedPointName.ToUpper()] it still gives me:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cannot apply indexing with [] to an expression of type 'Autodesk.Civil.Runtime.ParamPointCollection'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Something must be off with me if you're able to get it to work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Mar 2011 17:15:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/custom-subassemblies/m-p/2967630#M20783</guid>
      <dc:creator>ryarmak</dc:creator>
      <dc:date>2011-03-28T17:15:07Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Subassemblies</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/custom-subassemblies/m-p/2967808#M20784</link>
      <description>&lt;P&gt;Just a thought....Are you using the 64-bit version of C3D2011?&amp;nbsp;Do you have Service Pack 1 installed for C3D2011?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From the Readme for the SP:&amp;nbsp;An issue with certain API methods using an incorrect array type has been resolved for 64-bit operating systems.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Mar 2011 19:04:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/custom-subassemblies/m-p/2967808#M20784</guid>
      <dc:creator>Jeff_M</dc:creator>
      <dc:date>2011-03-28T19:04:15Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Subassemblies</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/custom-subassemblies/m-p/2967846#M20785</link>
      <description>&lt;P&gt;I am using the 64 bit version, but according to the Update 1 installer, I already have it installed.&amp;nbsp; It does sound like my problem I am having from the update notes.&amp;nbsp; Maybe I should send a bug report through the subscription center.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Mar 2011 19:21:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/custom-subassemblies/m-p/2967846#M20785</guid>
      <dc:creator>ryarmak</dc:creator>
      <dc:date>2011-03-28T19:21:39Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Subassemblies</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/custom-subassemblies/m-p/2971496#M20786</link>
      <description>&lt;P&gt;Just wanted to update now that I got the C# version of subassemblies to compile.&amp;nbsp; The only point on my subassembly that was right, was the point I couldn't get to work (marked point), the rest of everything I think the math is wonky, but it compiles, and it loads visually into the drawing.&amp;nbsp; This is a big plus!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for all the help in this endeavour, I probably will end up with more questions, but probably not weird error type like I have been having.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Mar 2011 20:15:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/custom-subassemblies/m-p/2971496#M20786</guid>
      <dc:creator>ryarmak</dc:creator>
      <dc:date>2011-03-30T20:15:51Z</dc:date>
    </item>
  </channel>
</rss>

