.NET

Reply
*Peter Granander
Message 1 of 5 (77 Views)

Tony Tanzillo, I'm in need of help...

77 Views, 4 Replies
08-03-2006 03:00 AM
Hi Tony,

You seem to know almost everything about programming in Autocad. Maybe you
can help me with my problem.

I want to draw an object, line or point, and snap it to other objects.
After I snapped my object too for example an end of a line or an
intersection with more then one line, I want to know wich objects I snapped
to so I can get their objectid's.

I think I've reed about a methode in ObjectARX to get the snapped objects,
but I can't find a similar methode in .NET.

Do you know anything about this?

Best regards
Peter Granander
*T.Willey
Message 2 of 5 (77 Views)

Re: Tony Tanzillo, I'm in need of help...

08-10-2006 04:34 PM in reply to: *Peter Granander
I'm not Tony, and I don't consider what I do in C# to be true code, but I'm
learning.

With that said, did you try ObjectSnapInfo? It has something (method I
think) called SnapCurves. Just an idea.

--

Tim
"A blind man lets nothing block his vision."


"Peter Granander" wrote in message
news:5257401@discussion.autodesk.com...
Hi Tony,

You seem to know almost everything about programming in Autocad. Maybe you
can help me with my problem.

I want to draw an object, line or point, and snap it to other objects.
After I snapped my object too for example an end of a line or an
intersection with more then one line, I want to know wich objects I snapped
to so I can get their objectid's.

I think I've reed about a methode in ObjectARX to get the snapped objects,
but I can't find a similar methode in .NET.

Do you know anything about this?

Best regards
Peter Granander
*Tony Tanzillo
Message 3 of 5 (77 Views)

Re: Tony Tanzillo, I'm in need of help...

08-10-2006 09:00 PM in reply to: *Peter Granander
I doubt that there's anyone that knows everything
about programming AutoCAD - there's just way too much
for one person to know and apply.

Second, your problem seems to be that you have not
taken the time and effort to learn the API that you're
trying to use, and that's really what you need to do.

When you create objects programmatically, you don't
'osnap' to them. Osnap is something that is part of
the user-interaction process (e.g., getting a point,
distance, etc., by calling a GetXxxxxx() method that
prompts for input).

If you want to for example, place the end of a line
at the intersection of two other objects, you can use
the IntersectWith() method of either of those objects,
to find their intersection(s), and then use that when
you specify the endpoint of the line.

If that's not what you had in mind, then you will need
to be more concise in the description of the problem.
In the mean time, the API you're trying to use is not
something you can learn in a few days/weeks or even
months.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006/2007
http://www.acadxtabs.com

"Peter Granander" wrote in message news:5257401@discussion.autodesk.com...
Hi Tony,

You seem to know almost everything about programming in Autocad. Maybe you
can help me with my problem.

I want to draw an object, line or point, and snap it to other objects.
After I snapped my object too for example an end of a line or an
intersection with more then one line, I want to know wich objects I snapped
to so I can get their objectid's.

I think I've reed about a methode in ObjectARX to get the snapped objects,
but I can't find a similar methode in .NET.

Do you know anything about this?

Best regards
Peter Granander
*Peter Granander
Message 4 of 5 (77 Views)

Re: Tony Tanzillo, I'm in need of help...

08-11-2006 03:48 AM in reply to: *Peter Granander
Thanks both of you...

And Tony you are perfectly right.

To have knowledge of the API is an advantage.

But I went from VB6 to .NET, and the step was a bit harder than I thought.

And I have had very little time to learn more about the API.

But I'm working on it... :-)

Thanks anyway.

Best regards

Peter
*Peter Granander
Message 5 of 5 (77 Views)

Re: Tony Tanzillo, I'm in need of help...

08-11-2006 03:48 AM in reply to: *Peter Granander
Thanks both of you...

And Tony you are perfectly right.

To have knowledge of the API is an advantage.

But I went from VB6 to .NET, and the step was a bit harder than I thought.

And I have had very little time to learn more about the API.

But I'm working on it... :-)

Thanks anyway.

Best regards

Peter
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.