auotprop custom propeties drop down 2
auotprop custom propeties drop down 2
(OP)
I like that autoprop macro and think it's excatly what we need with some massaging but have a few questions on it.
http:/ /cadimensi ons.com/zi p/SolidWor ks_Custom_ Properties _Automatio n_Tool.zip
Can it link to another file?
Reason we have #'s for our materials and it's quite extensive.
Could one put the material # in and have that macro reference another file with all the material descriptions or have it some where in that .ini file to populate our material description? Theres a password to edit the macro so I can't edit that fyi.
http:/
Can it link to another file?
Reason we have #'s for our materials and it's quite extensive.
Could one put the material # in and have that macro reference another file with all the material descriptions or have it some where in that .ini file to populate our material description? Theres a password to edit the macro so I can't edit that fyi.
Grant
Applications Engineer
SW2008 SP 2.0
IBM InteliStation Pro M
Nvidia Quadro FX 3000
P4 3.4 GHz, 2GB RAM
XP Pro SP2.0






RE: auotprop custom propeties drop down 2
Private Sub UserForm_Initialize()
Set fso = CreateObject("Scripting.FileSystemObject")
Set PropertyFile = fso.OpenTextFile("C:\property file.txt", 1)
Do Until PropertyFile.AtEndOfStream
ComboBox1.AddItem PropertyFile.Readline
Loop
End Sub
This should just populate a drop down menu with whatever you have in your text file. If that is what you are looking for, I can further develop this for you. Otherwise just let me know if I'm way off from what you were asking for.
RE: auotprop custom propeties drop down 2
How would you populate more than one property's drop downs using the same external file?
Matt Lorono
CAD Engineer/ECN Analyst
Silicon Valley, CA
Lorono's SolidWorks Resources
Co-moderator of Solidworks Yahoo! Group
and Mechnical.Engineering Yahoo! Group
RE: auotprop custom propeties drop down 2
RE: auotprop custom propeties drop down 2
"Art without engineering is dreaming; Engineering without art is calculating."
Have you read FAQ731-376: Eng-Tips.com Forum Policies to make the best use of Eng-Tips Forums?
RE: auotprop custom propeties drop down 2
CODE
AB
CD
EF
<END>
*FINISH
#4
NONE
#2B
MIRROR
AS COMPONENT
SEE NOTE
BLACK OXIDE
<END>
*MATERIALS
ACRYLIC
UHMW-PE
WHITE DELRIN
AISI 304
AISI 316L
316L SS - 16 GA
316L SS - 14 GA
316L SS - 12 GA
304 SS - 14 GA
304 SS - 12 GA
304 SS - 10 GA
<END>
*SUPPLIERS
JACOB
ANY
CUSTOM
SPAENAUR
MCMASTER-CARR
REID
BOSTON GEAR
<END>
*DRAWNBY
AB
CD
<END>
*CHECKEDBY
EF
GH
<END>
RE: auotprop custom propeties drop down 2
Matt Lorono
CAD Engineer/ECN Analyst
Silicon Valley, CA
Lorono's SolidWorks Resources
Co-moderator of Solidworks Yahoo! Group
and Mechnical.Engineering Yahoo! Group
RE: auotprop custom propeties drop down 2
this is the one I meant.
http://
That all would be fine but the macro is locked with a password so i can't edit it unless someone knows the password or can tell me how to by pass it.
thanks
Grant
Applications Engineer
SW2008 SP 2.0
IBM InteliStation Pro M
Nvidia Quadro FX 3000
P4 3.4 GHz, 2GB RAM
XP Pro SP2.0
RE: auotprop custom propeties drop down 2
CODE
Dim strTemp As String
'design by
cboDesignBy.Clear
Open "C:\CustomProperties.txt" For Input As #9
strTemp = ""
Do While strTemp <> "*DESIGNBY"
Input #9, strTemp
Loop
Do While strTemp <> "<END>"
Input #9, strTemp
If (Left(strTemp, 1) <> "'") And (strTemp <> "<END>") Then cboDesignBy.AddItem UCase(strTemp)
Loop
Close #9
'finish
cboFinish.Clear
Open "C:\CustomProperties.txt" For Input As #9
strTemp = ""
Do While strTemp <> "*FINISH"
Input #9, strTemp
Loop
Do While strTemp <> "<END>"
Input #9, strTemp
If (Left(strTemp, 1) <> "'") And (strTemp <> "<END>") Then cboFinish.AddItem UCase(strTemp)
Loop
Close #9
'part materials
cboMaterial.Clear
cboMatPP.Clear
Open "C:\CustomProperties.txt" For Input As #9
strTemp = ""
Do While strTemp <> "*MATERIALS"
Input #9, strTemp
Loop
Do While strTemp <> "<END>"
Input #9, strTemp
If (Left(strTemp, 1) <> "'") And (strTemp <> "<END>") Then
cboMaterial.AddItem UCase(strTemp)
cboMatPP.AddItem UCase(strTemp)
End If
Loop
Close #9
'create list of Suppliers
cboSupplier.Clear
Open "C:\CustomProperties.txt" For Input As #9
strTemp = ""
Do While strTemp <> "*SUPPLIERS"
Input #9, strTemp
Loop
Do While strTemp <> "<END>"
Input #9, strTemp
If (Left(strTemp, 1) <> "'") And (strTemp <> "<END>") Then cboSupplier.AddItem UCase(strTemp)
Loop
Close #9
End Sub
I use this routine in the Form_Load routine to read my data file, populate combos and set up the form combo boxes values. Last two groups of data are used in a different part of the program. My data file allows comments to be inserted. That line has to start with "'" and it will be ignored by this routine.