几何尺寸与公差论坛

 找回密码
 注册
查看: 657|回复: 0

【转帖】creating view

[复制链接]
发表于 2009-4-13 10:06:39 | 显示全部楼层 |阅读模式
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
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|Archiver|小黑屋|几何尺寸与公差论坛

GMT+8, 2024-12-24 03:14 , Processed in 0.035736 second(s), 19 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表