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

accoreconsole and active Model space viewports

7 REPLIES 7
SOLVED
Reply
Message 1 of 8
dbaldzhiev
2030 Views, 7 Replies

accoreconsole and active Model space viewports

I am trying to automate the process of moving the paperspace objects in a layout to modelspace. I am using CHSPACE and accoreconsole working with the simple script you can see attached. The dwg is exported from Revit. In most cases everything goes with no problems but there are a couple of dwgs that show 

Command: chspace

Select objects: all
3610 found
2468 were not in current space.

Select objects:
Ignoring 2 selected viewport(s)

There are no active Model space viewports.

If i try to CHSPACE from full AutoCAD there isn't a problem. I cannot find any difference between a dwg that works and a one that doesn't "have active model space viewports"

 

I tried to mview off all -> mview on all = no success

 This is the script I am pushing to accoreconsole

regenall
layout
set
Layout1
chspace all


(command)
model
audit
y
qsave
7 REPLIES 7
Message 2 of 8
cadffm
in reply to: dbaldzhiev

These layouts have not yet been initialized in the file,
this means from the user's perspective: The layouts have never been set in this file,
Only then will a layout be properly initialized and implemented correctly.

My description may not be technically correct, but it should explain something to you.

Open the file, change once in the layout, put the model area back up to date if you want, saveas anothername.dwg for testing.
Try it again.

I do not know any other way for it except once set layout current (CTAB).

 

Sebastian

Message 3 of 8
cadffm
in reply to: cadffm

I do not know any other way for it except once set layout current .. with acad.exe

Sebastian

Message 4 of 8
dbaldzhiev
in reply to: cadffm

Any clue to why would Revit export some dwg properly and other like that? How to prevent this behavior? Using acad.exe is no go for me.

Message 5 of 8
cadffm
in reply to: dbaldzhiev

So does the file work in AutoCAD once the layouts were set current?
So it's the point i said, okay.

Sorry, I know nothing about possible structures and working methods in Revit and export.

Based on my knowledge from AutoCAD:

Was the Layout ever current in Revit?  If this description makes any sense for Revit at all.
Or:
Are the files "good.dwg" and "issue.dwg" exported in the same way with the same setting?

Compare the Settings for Layout/Plot and Export on Revits side.
I hope you find a Revit supporter, unfortunately I can not contribute anything.

Sebastian

Message 6 of 8
dbaldzhiev
in reply to: cadffm

The files work flawlessly in acad.

The files are exported in bulk from Revit.. same settings and all. As far as I am concerned they are supposed to have identical settings.

After I change and resave the issue.dwg it works properly.

 

Message 7 of 8
cadffm
in reply to: dbaldzhiev

"The files are exported in bulk from Revit.."

So it isn't a export-Setting Problem.

 

I do not know how  Revit works with plans / layouts
Is there a file or a layout area per layout as in AutoCAD or is layout always created "on the fly"?

 

Perhaps the Layout was never plotted from Revit or something like this.

Or the "pagesetup" is different.

 

I hope you find it and report here of the problem and the solution.

 

Sebastian

Message 8 of 8
dbaldzhiev
in reply to: cadffm

The solution is to add ZOOM ALL once you have opened the Layout. It works with both accoreconsole and acad.exe

 

the script now looks like that

layout
set
Layout1
zoom all
chspace all


(command)
qsave

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

Post to forums  

AutoCAD Inside the Factory


Autodesk Design & Make Report