VBA hasn't vlax-curve- functions or some another functions for analyse of curves geometry but VB.NET has.


Registered forum members do not see this ad.
How do i do the following in vba??
Im having trouble translating the code
Code:(setq startPt (vlax-curve-getPointAtDist UpperObj stepLength)) (setq startPt2 (vlax-curve-getPointAtDist UpperObj stepLength2)) (setq endPt (vlax-curve-getClosestPointTo BottomObj startPt)) (setq endPt2 (vlax-curve-getClosestPointTo BottomObj startPt2)) (setq a1 (list (car startpt)(cadr startpt))) (setq b1 (list (car endpt)(cadr endpt))) (setq rad1 (angle a1 b1)) (setq ang (alg-ang UpperObj startPt)) (setq ang2 (alg-ang UpperObj startPt2))
VBA hasn't vlax-curve- functions or some another functions for analyse of curves geometry but VB.NET has.


Thanks asmi.
i've found the vlax.cls and curve.cls files that are floating around the internt.
Have you had any experience with these?
Whats your opinion on using them??
I have some experience with CurveGeometry Interface in .NET, but I prefer C# not VB.

Ive used them before, but had problems with crashing when running through loops (getting a bazillion points along a spline, constantly calling the class, instead of being able to send a big pile of data in one shot). My *guess* is, (and i hope Im wrong), is that even VLisp runs asynchronously, like AutoLisp, and I was spooning data from VB faster than it could process it.


SO rocheey if i was to use these class files what would be the method you would use to get around this error??
What did you end up doing??
Otherwise i think i might go that next step and look into the C#
If it is pleasant to you VB to you it is absolutely not necessary to study C #. Philosophy of .NET - universality and full compatibility at use of programming languages. On VB.NET to you it is accessible the same objects, methods and properties as on C# or Mahaged C++, a question only in construction of algorithms. However in .NET you will see Object Model AutoCAD which differs from VBA (COM), much additional methods and properties.

Although I dabble in .net, vb6, etc, I use VBA because it's *here*. On all the machines. We are a CAD business, not a development house, and having to take code home to tweak a bug or 'whip up' a utility is unacceptable for me.
Having said that, it looks like Im going to have to do *something* before we end up in 64-bit, and my VBA routines die a slow death.
Without starting a language war, what would be a natural jump for someone with 20+ years PC/GW/Q/VBDos/VB basic experience? Im flirting with Visual Lisp; it's on the machines, and it seems to support activex ... unless VBA is getting replaced with something robust I can get a jump on .... any takers here?
Conceivably, AutoCAD will incorporate Visual Studio Tools for Applications (VSTA) sometime in the near future – replacing VBA. That VSTA offering would likely allow programming via any of the current (and perhaps even those in development i.e., F#) flavors of .NET. Concentrating on one of those now would probably be a sensible move for anyone doing ACAD dev work.
I’d be interested to hear what the future holds for Visual Lisp. It may well suffer the same long term fate of VBA as they both access the same COM port.
Incidentally, rocheey, I see you are using Mechanical: Have you ever used the extended VBA capabilities offered by the McadAuto, BrepAuto, GeAuto libraries? With regard to the original query of this thread the GeAuto library offers the same functionality of vlax-curve. The BrepAuto would allow the more in depth examination of 3dSolids.


Registered forum members do not see this ad.
Guys would someone be so kind as to even show me one line of how to use vlax-curve functions within vb.net??
how do you do for instance obtain a point at distance along a curve in vb.net??
Thanks
Bookmarks