lardman363
Automotive
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!
[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!