Get point from dist

Get point from dist

dragnsbld
Contributor Contributor
402 Views
6 Replies
Message 1 of 7

Get point from dist

dragnsbld
Contributor
Contributor
Does anyone have an idea on how to get a point from a distance along an object within VBA (without using LISP). I am using VBA inside of Arch. Desktop. Message was edited by: Dragnsbld
0 Likes
403 Views
6 Replies
Replies (6)
Message 2 of 7

Anonymous
Not applicable
Hi,

Each object has to be treated differently.

In the simplest case of a line you can get the end points and the angle from
the X axis, then use the polarpoint API command


--


Regards

Laurie Comerford
wrote in message news:5927039@discussion.autodesk.com...
Does anyone have an idea on how to get a point from a distance along an
object within VBA (without using LISP). I am using VBA inside of Arch.
Desktop.

Message was edited by: Dragnsbld
0 Likes
Message 3 of 7

dragnsbld
Contributor
Contributor
Yeah there lies my problem. If I have an arc the arc needs to be changed to a LWPolyline and joined with a mated line before I begin the point location. Then a Perpendicular line from there needs to be added to an offset copy of the first line, then another offset copy needs to be added and the perpendicular line needs to be extended to the second line. This then creates a squared end (1 side of a rectangle) and the other side gets angled to form an arrow. I only have 2 problems doing this, the first is the reason for this reply. the second is creating the second perpendicular line using VB and not LISP.
0 Likes
Message 4 of 7

Anonymous
Not applicable
Hi,

With this level of complexity it would help it you Publish to DWF format a
graphic of what you are trying to achieve and post your lisp file.

That way the person who helps you will have better understanding of your
needs.

--


Regards

Laurie Comerford
wrote in message news:5927642@discussion.autodesk.com...
Yeah there lies my problem. If I have an arc the arc needs to be changed to
a LWPolyline and joined with a mated line before I begin the point location.
Then a Perpendicular line from there needs to be added to an offset copy of
the first line, then another offset copy needs to be added and the
perpendicular line needs to be extended to the second line. This then
creates a squared end (1 side of a rectangle) and the other side gets angled
to form an arrow. I only have 2 problems doing this, the first is the reason
for this reply. the second is creating the second perpendicular line using
VB and not LISP.
0 Likes
Message 5 of 7

Anonymous
Not applicable
Unfortunately, VBA is not equipped to do this, but the vlax-curve-* methods can do it. There's always the usual kludge of calling LISP code from VBA, if that sort of thing suits you.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2009
Supporting AutoCAD 2000 through 2009

http://www.acadxtabs.com

Introducing AcadXTabs 2010:
http://www.caddzone.com/acadxtabs/AcadXTabs2010.htm

wrote in message news:5927039@discussion.autodesk.com...
Does anyone have an idea on how to get a point from a distance along an object within VBA (without using LISP). I am using VBA inside of Arch. Desktop.

Message was edited by: Dragnsbld
0 Likes
Message 6 of 7

Anonymous
Not applicable
its possible for a polyline of course with trigonometry. i fudged it once with sendcommand & Length command. i.e.

Set tmpArc = ThisDrawing.ModelSpace.AddArc(myArc.center, myArc.radius, myArc.StartAngle, myArc.EndAngle)
ThisDrawing.SendCommand ("len" & vbCr & "t" & vbCr & DistanceTxt & vbCr & myArcPt(0) & "," & myArcPt(1) & vbCr & vbCr)
endPt = tmpArc.StartPoint
tmpArc.delete
0 Likes
Message 7 of 7

dragnsbld
Contributor
Contributor
I think this method may work the best for me right now cadger. Later I will sit down with a friend of mine and see about writing a new class/object model to do just this. That may not be for a few weeks however since this project has a tight deadline.

Thanks everyone for you input.
0 Likes