[API] How to access CosmeticThread object

Discussion in 'SolidWorks' started by Billy, Dec 21, 2003.

  1. Billy

    Billy Guest

    Dear All,

    I would like to access information of inserted cosmetic thread, not
    generated by Hole Wizard.
    I've got an object called CosmeticThread using GetTypeName function, but I
    don't know how to obtain its data since I found nothing called
    CosmeticThread in object browser of sldworks.

    Thank you very much.

    Billy
     
    Billy, Dec 21, 2003
    #1
  2. Billy

    Heikki Leivo Guest

    I've got an object called CosmeticThread using GetTypeName function, but I
    Cosmetic thread is a feature. To access cosmetic thread data, you have to
    get CosmeticThreadFeatureData object by calling Feature::GetDefinition. For
    example, let us assume you get cosmetic thread feature by some means, then
    you could do the following...

    Dim objCosmeticThread as SldWorks.Feature
    ..... '(get feature somewhere)
    Dim objCosmeticThreadData as SldWorks.CosmeticThreadFeatureData
    'Get feature definition
    Set objCosmeticThreadData = objCosmeticThread.GetDefinition
    'do something with data...
    xxx = objCosmeticThreadData.BlindDepth
    yyy = objCosmeticThreadData.Diameter

    etc.

    Refer to API help, for example write "cos" on the index tab...

    -h-
     
    Heikki Leivo, Dec 21, 2003
    #2
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.