-
-
Save dalenicholls/851f643c52e1bcc3349d731bae832adf to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class Extensions | |
{ | |
public enum Variables | |
{ | |
CLASS_ATTR, | |
FINISH | |
} | |
public static string GetReportProperty(this TSM.Part part, Variables variable) | |
{ | |
string value = ""; | |
part.GetReportProperty(variable.ToString(), ref value); | |
return value; | |
} | |
} | |
// usage... | |
private void demo() | |
{ | |
ModelObjectEnumerator modelObjectEnum = modelObjectSelector.GetSelectedObjects(); | |
while (modelObjectEnum.MoveNext()) | |
{ | |
if (modelObjectEnum.Current is TSM.Part) | |
{ | |
TSM.Part part = (TSM.Part)modelObjectEnum.Current; | |
Console.WriteLine(part.GetReportProperty(Extensions.Variables.CLASS_ATTR)); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment