Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Patriiick

Pages: 1 ... 6 7 [8]
106
F# language / What is F#
« on: November 19, 2010, 01:23:39 PM »
F# (pronounced F Sharp) is a multi-paradigm programming language, targeting the .NET Framework, that encompasses functional programming as well as imperative and object-oriented programming disciplines. It is a variant of ML and is largely compatible with the OCaml implementation. F# was initially developed by Don Syme at Microsoft Research but is now being developed at Microsoft Developer Division and is being distributed as a fully supported language in the .NET Framework and Visual Studio as part of Visual Studio 2010.

Code example:
Code: [Select]
(* print a list of numbers recursively *)
let rec printList lst =
    match lst with
    | [] -> ()
    | h :: t ->
        printf "%d\n" h
        printList t


source: F Sharp (programming language). (2010, November 16). In Wikipedia, The Free Encyclopedia. Retrieved 12:23, November 19, 2010, from http://en.wikipedia.org/w/index.php?title=F_Sharp_(programming_language)&oldid=397032758

For more information, see Microsoft F# developer centre.

107
C# language / What is C#
« on: November 19, 2010, 01:21:34 PM »
C# (pronounced "see sharp")[6] is a multi-paradigm programming language encompassing imperative, declarative, functional, generic, object-oriented (class-based), and component-oriented programming disciplines. It was developed by Microsoft within the .NET initiative and later approved as a standard by Ecma (ECMA-334) and ISO (ISO/IEC 23270). C# is one of the programming languages designed for the Common Language Infrastructure.

C# is intended to be a simple, modern, general-purpose, object-oriented programming language.[7] Its development team is led by Anders Hejlsberg. The most recent version is C# 4.0, which was released on April 12, 2010.

Code example:
Code: [Select]
using System;
class ExampleClass
{
    static void Main()
    {
        Console.WriteLine("Hello, world!");
    }
}


source: C Sharp (programming language). (2010, November 18). In Wikipedia, The Free Encyclopedia. Retrieved 12:19, November 19, 2010, from http://en.wikipedia.org/w/index.php?title=C_Sharp_(programming_language)&oldid=397558790
target audience:{beginner}

108
Math and Geometry / Find the midpoint between two points
« on: November 19, 2010, 10:40:23 AM »
Code: [Select]
''' <summary>
    '''=========================================================
    '''NAME: myMidPoint
    '''AUTHOR: Patrick EMIN
    '''DESCRIPTION: Finds the midpoint between two points
    '''ARGUMENTS: P1 and P2
    '''DATE: 03/11/2010
    '''=========================================================
    ''' </summary>
    ''' <param name="P1"></param>
    ''' <param name="P2"></param>
    ''' <returns>myLineSegment.MidPoint</returns>
    ''' <remarks>easier to create a line segment because we have the .MidPoint property...</remarks>
    Public Function myMidPoint(ByVal P1 As Point3d, ByVal P2 As Point3d) As Point3d
        Dim myLineSegment As New LineSegment3d(P1, P2)
        Return myLineSegment.MidPoint
    End Function

target audience:{beginner}

109
Math and Geometry / Converts degree angles to radian and vice-versa
« on: November 19, 2010, 10:15:24 AM »
Code: [Select]

    Function myConvertDegreeRadian(ByVal DegreeAngle As Double) As Double
        Return DegreeAngle / 180.0# * Math.PI
    End Function


    Function myConvertRadianDegree(ByVal RadianAngle As Double) As Double
        Return RadianAngle * 180.0# / Math.PI
    End Function

target audience:{beginner}

110
Visual Studio environment / Re: Using projects on a network drive
« on: November 19, 2010, 09:02:49 AM »
Thanks to (gile) who gives us the solution:

To launch DLL from a network drive, you have to authorise that on each computer.

One way to do this is to open a command window on each computer, go to .NET install directory (generaly "c:\windows\microsoft.net\framework\version\") , and enter the following command (with the true path to installed DLLs) :

caspol.exe -machine -quiet -addgroup 1 -url "file://Server/pathtoDLL/*" FullTrust

111
.NET newbies / The .NET AutoCAD developper guide
« on: November 17, 2010, 10:50:11 PM »
The .NET AutoCAD developper guide is online

[attachimg=1]

112
Blocks / Changing the order of attributes in a block
« on: November 17, 2010, 10:48:36 PM »
A Philippe Leefsma program written in C for .NET environnment will show you how to change the order of attributes in a block.

target audience:{intermediate}

113
.NET newbies / Comparing VBA and VB NET
« on: November 17, 2010, 10:43:47 PM »
A document from AutoCAD 2011 help files comparing VBA and VB NET functions.

114
.NET newbies / Layer 0 in VB NET
« on: November 17, 2010, 10:41:17 PM »
The layer "0" has its own constant in VB NET, it's "LayerZero", think about using it.
The following code makes Layer 0 current in the current document:

Code: [Select]
doc.Clayer = doc.LayerZero

target audience:{beginner}

115
Visual Studio environment / Plugins for Visual Studio?
« on: November 17, 2010, 10:36:23 PM »
When I was programming with VBA, I used MZ Tools, do you know of any similar addon for Visual Studio?

target audience:{beginner}

116
Visual Studio environment / Using projects on a network drive
« on: November 17, 2010, 09:36:35 PM »
It seems not possible to place .NET projects on a server, I get fatal errors when trying (curiously, not always), it seems there is a Security Exception problem. Do you know why this is like that and what could be done to overcome it? Thanks.
target audience:{beginner}

117
This site / Welcome on the AutoCAD .NET developpers forums
« on: November 17, 2010, 09:07:43 PM »
Hi!

My name is Patrick EMIN, (twitter @Patriiick), I created this site out of frustration not finding code examples and ressources for VB NET programming in AutoCAD.

Well, actually there are good things on the net, but scattered and on my opinion not down to earth oriented. What a newbie in VB NET like me needs is a set of good, simple examples sorted by categories, this is exactly what the "Net code" boards category on this site intend to be, with your help. (code boards are visible once you register on this site)

Thanks to share your expertise for those of you having passed the newbie step, for the others, please be concise and clear when posting questions.

Please see this topic before posting your first message.

Thanks for participating in this venture. You can follow us on Twitter (@AcadNETwork)...

Pages: 1 ... 6 7 [8]