几何尺寸与公差论坛

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

【转帖】insertsketchpicture

[复制链接]
发表于 2009-4-13 12:20:23 | 显示全部楼层 |阅读模式
insertsketchpicture
hi,
i want to insert a picture on a plane and i do this using the
modeldoc2:: insertsketchpicture
however i want to format this picture...
does anyone know how to change the width and height of the image?
cheers,
--stav.
in this world i am nobody...
and nobody is perfect ;) !!!
---------
solidworks office 2008 sp4.0
dell precision pws390
nvidia quadro fx 3450/4000 sdi
when you initially insert it you should be able to size it like a picture inserted into a word doc, just drag the sizing dots on the perimeter, if these aren't visible, try double clicking the image to bring it in to edit mode then do the same thing....
jordan
it all depends on your point of view...
it uses excel api activex objects when inserting pictures just like it does when inserting boms so effectively you should be able to modify it in the same way as excel can.
as for doing it by api, get the picture object using:
dim mypic as sketchpicture
set mypic = swsketchmanager.insertsketchpicture
then set the size using
mypic.setsize 200, 200, false
where the first param is the width, second is height and the 3rd is whether to lock the aspect ration of the image
hi guys,
thanks for the replies.
luke, i tried creating a sketchpicture object by i keep getting compile errors. do i need to change eny of the options of my macro?
also the api help says that the modeldoc2:: insertsketchpicture function returns a boolean. how can i assign the sketchpicture to the value returned?
cheers,
--stav.
in this world i am nobody...
and nobody is perfect ;) !!!
---------
solidworks office 2008 sp4.0
dell precision pws390
nvidia quadro fx 3450/4000 sdi
soory i meant to say sketchmanager.insertsketchpicture
the reason i could not find the function is because we dont have the latest version of solidworks and that api functionality is not supported in sw2007 sp4 ...
thanks for the tips though i'll be on it again as soon as we migrate to 2008.
--stav.
in this world i am nobody...
and nobody is perfect ;) !!!
---------
solidworks office 2008 sp4.0
dell precision pws390
nvidia quadro fx 3450/4000 sdi
quick
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-12-23 13:49 , Processed in 0.035549 second(s), 20 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2023 Discuz! Team.

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