ObjectARX
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Draging line

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
KIMHENGHOR98
448 Views, 4 Replies

Draging line

I want to make a line which the start point is dragging a long polyline and the end point dragging for cursor.

 

please someone could help me <<<<<>>>>>

4 REPLIES 4
Message 2 of 5
tbrammer
in reply to: KIMHENGHOR98

I don't understand what exactly you are asking for. You want to make a line. So you need startpoint and endpoint.

What do you mean by: "start point is dragging a long polyline"? Do you have a given polyline, want to drag it's endpoint and then use the new endpoint as startpoint for the new line? 

 

If you have a given startpoint ptStart you could simply use acedGetPoint(ptStart, L"Endpoint:" ptEnd) to select the endpoint ptEnd. AutoCAD will draw a rubber-band line from ptStart to the cursor point then.

A more sophisticated and flexible approach is to use an jig (AcEdJig). See sample  <ArxSdk>\samples\database\elipsjig_dg.

 

At which point do you need help? Selecting the points? Implementing a jig? Creating the line entity?


Thomas Brammer ● Software Developer ● imos AGLinkedIn
If an answer solves your problem please [ACCEPT SOLUTION]. Otherwise explain why not.

Message 3 of 5
KIMHENGHOR98
in reply to: tbrammer

I have a polyline the thing is : I want to create a line Enity derived from acdbPolyline but when I am drawing that entity it’s starting point is moving through that polyline while dragging its end point with cursor

Message 4 of 5
tbrammer
in reply to: KIMHENGHOR98

Check out the attached project. It is based on the sample <ARX>\samples\database\elipsjig_dg.

Compile, start AutoCAD and load the plineLine.arx. Make sure you have a polyline and a line in your drawing and enter "PLJ". Select the line then the polyline. 

 


Thomas Brammer ● Software Developer ● imos AGLinkedIn
If an answer solves your problem please [ACCEPT SOLUTION]. Otherwise explain why not.

Message 5 of 5
KIMHENGHOR98
in reply to: tbrammer

Thanks you very much I understood how to use getClosestPointTo()

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

Post to forums  

AutoCAD Inside the Factory


Autodesk Design & Make Report