Community
AutoCAD Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Why can't AutoCAD get the appropriate plot paper size out of this dxf file?

9 REPLIES 9
SOLVED
Reply
Message 1 of 10
nickrazes
206 Views, 9 Replies

Why can't AutoCAD get the appropriate plot paper size out of this dxf file?

Hello everyone.

 

I'm trying to write a program that saves a simple dxf file. Why can't AutoCAD get the plot paper size out of the attached dxf file? I saved the paper size string (ANSI D) under code 4 of the LAYOUT section as the exact same string that AutoCAD saves it as. I've also stored the exact same code 44 and 45 (plot page size MM) as AutoCAD does. Why does AutoCAD open this dxf file and apply the default Letter page size instead of ANSI D? What am I missing?

 

Thank you in advance for your time/replies.

9 REPLIES 9
Message 2 of 10
paullimapa
in reply to: nickrazes

I've created pagesetups both in Model & Layout1 and applied them.

Both pagesetups use:

plot device: DWG To PDF.pc3 

paper size: ANSI D

Pen style: monochrome.ctb

See if attach dxf works out for you

paullimapa_0-1706298414394.png

paullimapa_1-1706298441532.png

 

 


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
Message 3 of 10
nickrazes
in reply to: nickrazes

Thank you, but I'm trying to write a program that can output a dxf file that works with AutoCAD. I'm essentially trying to find the specific difference(s) between the file I attached and the file you attached that allows AutoCAD to open the plot paper settings of the file you attached and not the file I attached.

 

I've been trying to compare/contrast the files manually but can't seem to find the problem. I was hoping someone on here might just know what might be causing the problem.

Message 4 of 10
cadffm
in reply to: nickrazes

Hi,

 


@nickrazes  schrieb:

I was hoping someone on here might just know what might be causing the problem.


Sure, but who wants to do the work for a problem that they don't have and is actually unnecessary and needs a lot of time of explaination- hours, days - for zero bucks?
You could just start with a clean AutoCAD file instead of putting something together yourself.

It's too much work for me to explain what information is necessary for an initialized or at least complete layout,
You're not just missing a line...

 

>>"I've been trying to compare/contrast the files manually but can't seem to find the problem."

? You will find hundred(s) line more in a ready file, so how can you find "nothing"?

 

(I personally think your approach is very commendable, but then you should get further into the topic yourself, it's definitely easier to use a ready-made template)

Just use the file I already gave you as a basis:

https://forums.autodesk.com/t5/autocad-forum/why-can-t-autocad-open-this-dxf-file/m-p/12498493#M1122...

 

👍

- Sebastian -
Message 5 of 10
nickrazes
in reply to: nickrazes

Thank you for the reply.

 

It's fine if the OP is something that you don't want to help with, but please don't speak for everyone. It's very possible that someone out there is capable of just glancing at the file and know what's wrong with it.

 

Please don't bash me for simply asking. FYI, a no reply takes a lot less of your time then typing out a response getting on my case. And please don't make up that I haven't been trying to go through a template file on my own before posting.

 

The attached file is a greatly simplified file to make it easier for someone on here to look at. If I use my program to save a file, it's waaaaay bigger than what's attached. I can't get further into the topic myself because figuring this plot settings issue problem is probably the final thing.

Message 6 of 10
cadffm
in reply to: nickrazes

Hi

 

>>"please don't speak for everyone."
Right, but I know how few users are replying to such threads. Specialy because a solution is easy,  without to figure it out the issue here.

 

>>Please don't bash me for simply asking"

Never.

 

>>"FYI, a no reply takes a lot less of your time then"

But as you can see, I replied and try to help, as I already did it before.

 

And if I am back on a device with more than 5" display, and if time for it,  I doublecheck my guessing and will answer to your data.

 

Compare data: I guess you tried to add data from sample file to yours, 

I would go the other way - strip the sample file down.

 

 

 

 

 

- Sebastian -
Message 7 of 10
nickrazes
in reply to: nickrazes

Fair enough.

 

Stripping down the one saved by autocad was what I was working on. Thing is that it's like 12k lines so it's taking awhile. I've been deleting stuff and then trying to reopen it and see if it can still open and/or if my plot settings are still there. As of this post my sample is down to 8k lines.

 

I noticed the objects section has a dictionary with a bunch of scale objects that are used to populate the scale dropdown box of the plot paper settings dialog box so I might be getting a little closer. (Curiously, the scale objects aren't in the dxf reference guide.) I'm thinking that maybe there's another dictionary somewhere that autocad grabs the rest of the information for the paper sizes from and the problem is that my file/program is missing that dictionary.

 

Maybe it sees the paper size under the 4 code under LAYOUT and then, based on that information, goes looking for the appropriate dictionary, doesn't find it, then just displays the default settings and that's what the problem is. Maybe not though. I'm still looking.

Message 8 of 10
cadffm
in reply to: nickrazes

Not 100% sure if it has to do with the topic,

but with Layouts generally.

For an initialisized Layout, you need a VIEWPORT.

The first viewport in Layout comes from the system is not a user defined one.

It stores how you can see the layout.

 

S.

- Sebastian -
Message 9 of 10
nickrazes
in reply to: nickrazes

Figured it out. The layout object needed some lines to be updated, in particular the ones related to scale. Thank you both for your time.

Message 10 of 10
cadffm
in reply to: nickrazes

Congratulation.😀

 

- Sebastian -

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

Post to forums  

Autodesk Design & Make Report

”Boost