×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

auotprop custom propeties drop down 2

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://cadimensions.com/zip/SolidWorks_Custom_Properties_Automation_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.
 

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

Sure, sounds easy enough.  Just create a .txt file with each line containing a material.  Then use readline to populate your drop down menu.  Something like this I imagine would do what you are looking for:


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

It would be a little more tricky, but it could probably be done using If Else statements.  I think it would be easier just to have a different .txt file for each property.

RE: auotprop custom propeties drop down 2

When you select a Material Description, how could you get the Material Properties of the model to update?

"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

I am using just one data file to populate my custom properties. I have a header for each group of custom properties values, to find it, and a marker at the end. Probably I could do without the marker. The header is something like *VENDORS. This is a smaple:

CODE

*DESIGNBY
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

(OP)
Just realized I linked to the wrong property macro.

this is the one I meant.
http://www.goengineer.com/support/downloads/AutoProps.zip

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

Matt, I hope you are not pulling my leg. Here you go:

CODE

Private Sub Populate_Combos()
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.  

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources