Window does not contain a definition for window

Window does not contain a definition for window

Anonymous
Not applicable
1,103 Views
2 Replies
Message 1 of 3

Window does not contain a definition for window

Anonymous
Not applicable

I have been learning how to resize the model space and app and I tried to use this code from "through the interface" but it brings up the following error in the image. I added Presentationcore.dll because that is all that I have been able to find  on  pplication.DocumentManager.MdiActiveDocument.WindowApplication.DocumentManager.MdiActiveDocument.Window

running win10 home

tried updating .net from 4.6 to 4.7

autocad2017

 

delete.png

0 Likes
Accepted solutions (1)
1,104 Views
2 Replies
Replies (2)
Message 2 of 3

norman.yuan
Mentor
Mentor
Accepted solution

You did not say, but obviously you are using newer AutoCAD version than AutoCAD2009/2010, which was the version Kean's article based on.

 

The 2 properties "Location" and "Size" of the class Autodesk.AutoCAD.Windows.Window in AutoCAD2009/2010 has changed in later versions of AutoCAD (I could not recall which, 2012, or 2013?) to "DeviceIndependentLocation: and "DeviceIndependentSize".

 

 

Norman Yuan

Drive CAD With Code

EESignature

0 Likes
Message 3 of 3

Anonymous
Not applicable

Thank you.

0 Likes