how to get Component Description from API... please help

Please, please, please, point me in the right direction.

I have tried the help documents and online resources to no avail - (did you know the word "description" is in almost every help document?). Does anyone know either implicitly or theoretically how to retrieve a component's description?

- Right clicking on a component in the feature manager

- Select Component Properties

- Component Description is the value I am looking to lay my hands upon.

The following methods return " " (empty set) for all components I loop thru:

CompDescr = ModDoc.CustomInfo2({variable for current configuration}, "DESCRIPTION") CompDescr = ModDoc.CustomInfo2("", "DESCRIPTION")

Where ModDoc = Component2.GetModelDoc() And Component2 initially is RootComponent, but recursively loops through all child components

Greatly appreciated, Derek Ciula

Reply to
Derek Ciula
Loading thread data ...

The ModDoc object as you define it no longer has any component properties; it is only the part (or assembly) without context.

Custom property names are cASE sENSITIVE.

Also of interest: ModelDoc2::SummaryInfo AssemblyDoc::FeatureByName (try getting component as a feature object) Feature::Description

from help: Component descriptions appear only if you selected Description in Custom property used as custom description in the General system options. You can select a different item for Custom property used as custom description, but you must set a value for that custom property on the Custom tab of the Summary Information dialog box.

Reply to
That70sTick

I don't suppose you could tell me how to define an Object that would retain component properties?

But thanks for info, This will at least give me a few more leads to dig around in.

I can get Model Document Path, which is the field directly below, the Component Property(what i'm looking for)

with the following code: ModDoc.GetPathName

would it be overly hopeful that there's a ModDoc.GetDescription ? or something similar? Thanks, Derek

Reply to
Derek Ciula

The buck stops with case sensitive config types... I changed DESCRIPTION to Description and everything what happy.

Thank you very much Mr70's I don't suppose you live in WI? I'll send you a christmas present for your help.

Reply to
Derek Ciula

Lived in WI most of my life. there's a reason "That 70's Show" is set in Wisconsin: the 70's never really left!

Reply to
That70sTick

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.