|
creating view
running in to a strange problem here. creating a new drawing sheet, and trying to place a view on it.
the code that i wrote works perfectly on some drawings, and then on others it doesnt work.
set swview = swdraw.createflatpatternviewfrommodelview3(checkdups(i), vconfname, 0.15, 0.1, 0, true, false)
problem is that even though i have a model and path in the array and a configuration name, a view does not get created on the sheet. then i get stuck with an error when a few lines later i try to interact with the view that /should/ be there.
any ideas why this line would be failing to create a view even though it has the information and access to the file(s)?
the only variables are the config and the path to the file. i believe the file has to be loaded in solidworks before calling this method so it may work if it is loaded, and fail if it is not
i thought this might be true too, but did some testing with having the assembly loaded and the parts loaded and it didn't make a difference.
it's very weird that it will work on certain drawings perfectly, and then not work at all on other drawings. i'll be attempting to debug it more today, and i'll post the cause/fix if i figure it out.
quick |
|