Creating a line

Creating a line

Anonymous
Not applicable
616 Views
1 Reply
Message 1 of 2

Creating a line

Anonymous
Not applicable
If my question is to basic then I’m sorry since I’m a beginner as a programmer in the AutoCAD environment.
.
I’m trying to write a module that will interact with the client and will create a simple line.
Using the following commands I can create a simple line but I want to add to my module an angle lock meaning (for example) before the module will run the user will input an angle and after the users first pick when the system is waiting for his second pick his mouse movements will be limited (like when using the ortho mode.

I know that in other CAD softwares there are class modules that give the programmer more flexibility when interacting with the user.


varStart = .GetPoint(, vbCr & "Pick the start point: ")
varEnd = .GetPoint(varStart, vbCr & "Pick the end point: ")
Set objEnt = ThisDrawing.ModelSpace.AddLine(varStart, varEnd)

Thanks in advance,
David.
0 Likes
617 Views
1 Reply
Reply (1)
Message 2 of 2

norman.yuan
Mentor
Mentor

With VBA, it is impossible to do what you want. Period.

 

With raw ObjectARX or ObjectARX .NET API, yes, it is possible.

 

With VBA in AutoCAD dying quickly, you may want to turn your Acad programming effort to .NET API, if your Acad programming task is important to you.

 

Norman Yuan

Drive CAD With Code

EESignature

0 Likes