Jump to content

set origin to 0,0 for x and y coordinates


ali888

Recommended Posts

Hi,

 

I have an existing drawing (.dwg) that I would like to be able to set the x and y origin to 0,0. Is it possible to do it in DXF via notepad?

 

I am using autocad LT 2007 on windows 7 Pro.

 

Any help would be greatly appreciated.

 

Thank you

Link to comment
Share on other sites

Sorry, gotta ask...If you have LT, why would you want to use Notepad to try to change a drawing in DXF? Why not just open the drawing in LT, fix whatever needs fixed and export it again?

 

I won't say its impossible to do, why would you want to?

Link to comment
Share on other sites

Thank you for your reply.

 

No, by all means, you can raise any questions to me.

 

I was trying to do it in DXF because I want to be able to write some dxf code in notepad. What happens is that I have this drawing used as a base drawing. I also have a spreadsheet filled with x and y coordinates for items that I would like them to appear in the base drawing. So I was thinking if I could set the x and y coordinates to 0,0 on the base drawing, then I will have to write some codes to put in the items with their x and y coordinates and save it as dxf. Hopefully, it will work.

 

Thank you

Link to comment
Share on other sites

I've not tried changing the base point but what I usually do is create a REALLY simple drawing. Perhaps one rectangle and one circle. Save as dxf. Make one change and save as another dxf. The .dxf can then be changed to .txt and open both files in excel. One file in column A, the other in column B. Scroll down and look for changes and examine until you find what the differences are doing.

Link to comment
Share on other sites

That's pretty interesting, though its seems like an extraordinary amount of effort. I did a drawing just as Dave suggested, one circle, one rectangle. Saved as 2004 dxf. Opened the file in Excel, 10926 lines. In Autocad, I created the file in less than a minute. No faster than I type, it would have taken all day to generate that much text. Pretty cool thing though.

Link to comment
Share on other sites

we use a similar method to create our loop drawings, often a set of about 1500 very similar drawings. My program opens a dxf file and reads through it a line at a time, writing each line to a new file thereby creating a copy. When it comes across a bit of DTEXT ( :D ) starting with a # symbol it goes off to a database and replaces the # with the contents of the database. This way you can produce lots of similar drawings without the need for AutoCAD (until you turn the dxf abck in to a dwg).

Link to comment
Share on other sites

I can see where that would come in handy then. I've been working in the custom one-off business so long, I've forgotten how to think in production mode. Back in the Mechanical desktop days, you could use a spreadsheet to drive drawings. We had a machine that made return bends in copper tubing. If you wanted to change tubing diameter for instance, there were more than 220 pieces of tooling that had to be remade. Took a couple weeks of experimentation, but we worked up a spreadsheet that would allow us to input four essential dimensions, and it would generate all 220 part drawings for us.

Link to comment
Share on other sites

Sorry just a question why not write a script rather than a dxf bit simpler its just line after line of commands.

 

eg draws 2 boxes

line
0,0
0,1
1,1
1,0
c

2,2
2,3
3,3
3,2
c

Link to comment
Share on other sites

Thank you all for your replies.

 

That's great. I can do it.

 

However, if I want to make sure if the drawing actually starts at x, y coordinates (0,0). How do it do that?

 

Thank you

Link to comment
Share on other sites

I don't even know what that means. What part of the drawing do you consider as the start? Is it the centroid of all your shapes, is it the bottom left most shape, is it where the insertion point of this drawing? ALL my drawings start at 0,0 as defined by my dwt file and all graphical details are offset from that base.

Link to comment
Share on other sites

Thank you Dave for your reply.

 

Thanks for your explanation. I am sorry if I haven't made it clear myself. It's been a while since I last touched the cad drawing. It's just that I got this drawing - a drawing of a map of a town. And I have things I would like to put them into the map. Therefore, I am just worried that I don't put them at the wrong coordinates. For now, let me work out what is first required to be done.

 

Thank you very much for all your assistance. really appreciated it.

Link to comment
Share on other sites

Quick cheats way to make a point 0,0 just do UCS OB pick say a line left end it will now make this left pt 0,0 draw what you want then go back to world is just UCS W do the UCS as many times as you like but each time will reset 0,0 unless you save each UCS.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...