Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Check If Feature Is Published

Status
Not open for further replies.

lardman363

Automotive
Feb 8, 2013
173
US
I need a way to check if something is published...a better way than just checking the name.

[ul]
[li]If I have 2 features with the same name (not a good practice, but people do it), for example I have 2 bodies both named "BOLT"[/li]
[li]I publish the first "BOLT" body...but I hide it.[/li]
[li]I do not publish the second "BOLT" body...but it is in show mode.[/li]
[li]Now I run a macro to select features to copy/paste with link into another part. The macro uses SelectElement3, so I can use selection trap to quickly select things on the screen.[/li]
[li]The problem is I selected the shown/non-published "BOLT" body[/li]
[li]The macro checks the publication names in the part's product and the macro thinks the shown "BOLT" body is published, because the name of the hidden bolt body is in the publications list[/li]
[li]The macro fails because you cannot make a link to a non-published element (Changing this setting is NOT an option)[/li]
[/ul]
I was researching the Parameter.Valuation property but the .chm is very cryptic and I do not know what the property returns, besides "This example returns the final reference Ref of the publication object Pub1".
If it returns the feature path, I was thinking there may be a way to compare the path of the published feature to the selected object to see if they are the same.
It would be nice if there was a "IsPublished" property to make this easy...
Any help would be appreciated!
 
Replies continue below

Recommended for you

after the selection, can you just get the name, then go in Bodies family and get the one with a name that match and that is in no show?

Eric N.
indocti discant et ament meminisse periti
 
How do you know if there is another one that is hidden? There has to be a better way...
 
lardman363 said:
I publish the first "BOLT" body...but I hide it.
I do not publish the second "BOLT" body...but it is in show mode.

Eric N.
indocti discant et ament meminisse periti
 
Yeah, I'm giving that example...but when you have 300 features selected you don't know what others do in their parts...but you have to try to plan for it.
 
I got this to work using .Valuation property...I misunderstood how to use it but got it to work now. Some more tips are here.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Top