View Full Version : SetPageSetups.dvb error
CAD_monkey
2010-08-16, 11:59 AM
I have great routine Ed Jobe posted a while back to for setting page setups. In 2011 it returns a type mismatch error at the line below. I don't see where anyone else has had this problem. Does anyone have a solution?
'initialize vars
Set colPCs = ThisDrawing.PlotConfigurationsiveLayout.ModelType
Ed Jobe
2010-08-16, 02:25 PM
That doesn't look familiar. You must have edited it somehow. colPCs takes a collection object. That would be "ThisDrawing.PlotConfigurations". I have no idea where the rest came from.
CAD_monkey
2010-08-16, 02:43 PM
Sorry, something scrambled in the text paste. Attached is an image of where the debug stops. I still have 2008 available and the same code works fine there.
Ed Jobe
2010-08-16, 03:04 PM
Given that there is no typo, it can only be one of two things. Either you have references incorrctly set (Tools>Refernces, check for MISSING) or they changed the tlb so that ThisDrawing.Plotconfigurations no longer returns an AcadPlotConfigurations object. I can't check that for you since I'm still on 2010.
CAD_monkey
2010-08-16, 03:29 PM
Thanks, References was the problem. Had to remove the "AutoCAD 2008 Type Library" and add the "AutoCAD 2011 Type Library". This is the first upgrade I've had a problem with.
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.