AutoCAD Land Desktop (Read Only)
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Acadobjects from Alignments

3 REPLIES 3
Reply
Message 1 of 4
DingDong
190 Views, 3 Replies

Acadobjects from Alignments

In VBA:

If I isolate the elements of an alignment, and set a variable to the element ( Say: Tangent = the element which is ktangent), can I then create a new variable for an Acadentity or Acadobject and set that variable equal to the tangent? I assume a tangent is basically an AutoCad line. I have tried with no luck, and was hoping that someone could point me in the right direction. Hope I was clear with my question.

Regards
Rob
3 REPLIES 3
Message 2 of 4
Anonymous
in reply to: DingDong

Rob,

 

Use the AddLine method to create the line using the
coordinates from the alignment tangent.

 

Set lineObj = ThisDrawing.ModelSpace.AddLine(startPoint,
endPoint)

Before creating the line you should use the
AeccUtility method EastNorthToXy to convert the northing easting coordinates to
X,Y for the current drawing. This takes into account the drawing base point and
rotation.
The Land ActiveX Reference help file
has an example on using this method.

 

Glen

 

 


style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
In
VBA:

If I isolate the elements of an alignment, and set a variable to the
element ( Say: Tangent = the element which is ktangent), can I then create a
new variable for an Acadentity or Acadobject and set that variable equal to
the tangent? I assume a tangent is basically an AutoCad line. I have tried
with no luck, and was hoping that someone could point me in the right
direction. Hope I was clear with my question.

Regards
Rob

Message 3 of 4
Anonymous
in reply to: DingDong

Hi Bob,

The tangent can be drawn as a line with appropriate code, but in the VBA
environment it is not a line, but an aeccobject.

Unless you let us know precisely what you want as output it's hard to go
further.

--


Laurie Comerford
CADApps
www.cadapps.com.au

"DingDong" wrote in message
news:f0ca8e2.-1@WebX.maYIadrTaRb...
> In VBA:
> If I isolate the elements of an alignment, and set a variable to the
element ( Say: Tangent = the element which is ktangent), can I then create a
new variable for an Acadentity or Acadobject and set that variable equal to
the tangent? I assume a tangent is basically an AutoCad line. I have tried
with no luck, and was hoping that someone could point me in the right
direction. Hope I was clear with my question.
>
> Regards
> Rob
>
Message 4 of 4
DingDong
in reply to: DingDong

Thanks for the responses….

I think Glen has outlined what I should do, but to answer Laurie’s question, I am trying to locate the intersection of all alignments that either cross each other or start/end on other alignments. I know that a method exists to determine the intersection of a line with an alignment, but I think that method uses 2 points to project a line until it intersects the alignment. What I want to do is use the Acad method to list all intersections that actually exist, without projecting the line. That is why I wanted to convert the Ktangent to a line and Kcurve to an arc.

Thanks again!!!
Rob

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report