几何尺寸与公差论坛

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

【转帖】custom properties

[复制链接]
发表于 2009-4-12 20:37:39 | 显示全部楼层 |阅读模式
custom properties
please advise how can one write the x & y cordinates of a sketch point as custom properties.(see code below) i would like custom properties of the x & y cordinates to be shown on the drawing of the part.is it possible to values to be shown as follows:
start point
x - xxxx (x co-ordinate)
y - xxxx ( y co-ordinate)
also, is it possible to write the x & y co-ordinates of more than one point as custom properties/
option explicit
dim swapp as sldworks.sldworks
dim part as modeldoc2
dim measure as measure
dim boolstatus as boolean
sub main()
set swapp = application.sldworks
set part = swapp.activedoc
set measure = part.extension.createmeasure
dim strdisplay as string
boolstatus = measure.calculate(nothing)
if (boolstatus) then
if (not (measure.x = -1)) then
debug.print "x coordinate: " & measure.x
end if
if (not (measure.y = -1)) then
debug.print "y coordinate: " & measure.y
end if
if (not (measure.deltax = -1)) then
debug.print "deltax: " & measure.deltax
end if
if (not (measure.deltay = -1)) then
debug.print "deltay: " & measure.deltay
end if
end sub
feroz mahomed
windows xp professional sp2
sworks 2009 sp2
nvidia quadro fx1500
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-12-23 09:19 , Processed in 0.035656 second(s), 19 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2023 Discuz! Team.

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