Entities not created at the coordinates I specify

Entities not created at the coordinates I specify

NickBrege
Enthusiast Enthusiast
1,353 Views
5 Replies
Message 1 of 6

Entities not created at the coordinates I specify

NickBrege
Enthusiast
Enthusiast

I'm having an issue of my entities not being created at the coordinates I specify in code.  For example, if I create a circle entity (see code below) with a center point of 0,0,0 it is not created there, but at a coordinate of -347,-1957,0.  Does anybody have any idea what might be going on here?  Any help would be greatly appreciated.  Thanks...

 

 

 

Dim center() As Double = {0.0, 0.0, 0.0}
Dim circleObj As AcadCircle = doc.ModelSpace.AddCircle(center, 1.0)

 

Capture.JPG

0 Likes
1,354 Views
5 Replies
Replies (5)
Message 2 of 6

Ed__Jobe
Mentor
Mentor

Do you have a user coordinate system in effect?

Ed


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
How to post your code.

EESignature

0 Likes
Message 3 of 6

NickBrege
Enthusiast
Enthusiast

Not that I am aware of.  How would I check something like that?

0 Likes
Message 4 of 6

Ed__Jobe
Mentor
Mentor

UCSMAN will show you what UCS's have been defined and which one is current.

Ed


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
How to post your code.

EESignature

0 Likes
Message 5 of 6

NickBrege
Enthusiast
Enthusiast

That appears to have solved it.  It was set to "Unnamed" & I set it to "World" now.  Thank you so much.  Do you know if there is a method to set the UCS in code?

0 Likes
Message 6 of 6

Ed__Jobe
Mentor
Mentor

You may need to keep the current ucs. You can translate a point from one coordinate system to another. In the Object Browser, find the TranslateCoordinates method of the AcadUtility object and click on the help button. It will explain it and there is a code sample. PS, if I solved your original question, I would appreciate if you marked it as solved.

Ed


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
How to post your code.

EESignature

0 Likes