read a note content in visual basic
read a note content in visual basic
(OP)
In my title block I have a note for the Job Number. The note is $PRPSHEET:"Job No" and is linked to a custom property in the Part. How do I read the actual content of the note into a VB program to be able to inserted into a text box on a form?
Netshop21
Netshop21






RE: read a note content in visual basic
The following code is used to copy the existing settings of a set of custom properties to a form. Hopefully will guide you to a starting point.
Sub LoadCustInfo()
Set swApp = CreateObject("SldWorks.Application")
' Attach to or open SolidWorks session
Set Model = swApp.ActiveDoc ' Grab the current document
frm1.Issue.Text = Model.CustomInfo2("", "Issue")
frm1.Drawingno.Text = Model.CustomInfo2("", "KETDDrg")
frm1.Desc1.Text = Model.CustomInfo2("", "Descline1")
frm1.desc2.Text = Model.CustomInfo2("", "Descline2")
frm1.desc3.Text = Model.CustomInfo2("", "Descline3")
frm1.cusdraw(0).Text = Model.CustomInfo2("", "Custdrg")
frm1.Datecomp(1).Text = Model.CustomInfo2("", "Date")
End Sub
Regards
Kevin
kevin@ketd.co.uk
RE: read a note content in visual basic
Is it posible to modify the value of a custom property by linking it to an external model?
Andrew (Netshop21)