accoreconsole and active Model space viewports

dbaldzhiev
Contributor
Contributor

accoreconsole and active Model space viewports

dbaldzhiev
Contributor
Contributor

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
0 Likes
Reply
Accepted solutions (1)
2,029 Views
7 Replies
Replies (7)

cadffm
Consultant
Consultant

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

0 Likes

cadffm
Consultant
Consultant

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

Sebastian

0 Likes

dbaldzhiev
Contributor
Contributor

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.

0 Likes

cadffm
Consultant
Consultant

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

0 Likes

dbaldzhiev
Contributor
Contributor

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.

 

0 Likes

cadffm
Consultant
Consultant

"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

0 Likes

dbaldzhiev
Contributor
Contributor
Accepted solution

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