![]() |
【转帖】add notation to the drawing
add notation to the drawing
this is a simple macro i recorded what i want to do here is 1) how to let the user select a setpoint at runing or current position of the solidworks cursor 2) the user can keep adding notations without rerun the macro any help, pls thx, chris sub main() set swapp = application.sldworks set part = swapp.activedoc set selmgr = part.selectionmanager dim note as object dim annotation as object dim textformat as object set note = part.insertnote("") if not note is nothing then note.angle = 0 boolstatus = note.setballoon(0, 0) set annotation = note.getannotation() if not annotation is nothing then longstatus = annotation.setleader2(false, 0, true, true, false, false) boolstatus = annotation.setposition(0.329949345597, -0.04584111233276, 0) boolstatus = annotation.settextformat(0, true, textformat) end if end if part.clearselection2 true part.windowredraw end sub solidworks 2007 (office pro.) sp5.0 testing solidworks 2009 (pro) sp0.0 dell precision t3400 2 cpu (8500) 3.16 ghz, 3.25 gb of ram window xp pro sp2 nvidia fx 570 6.14.11.6262 edited: 08/19/2008 at 02:00 pm by chris ch chris, deepak gupta sw2007 sp5.0 sw2009 sp2.1 |
所有的时间均为北京时间。 现在的时间是 06:09 PM. |