×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Check If Feature Is Published

Check If Feature Is Published

Check If Feature Is Published

(OP)
I need a way to check if something is published...a better way than just checking the name.

  • 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"
  • I publish the first "BOLT" body...but I hide it.
  • I do not publish the second "BOLT" body...but it is in show mode.
  • 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.
  • The problem is I selected the shown/non-published "BOLT" body
  • 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
  • The macro fails because you cannot make a link to a non-published element (Changing this setting is NOT an option)
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!

RE: Check If Feature Is Published

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

RE: Check If Feature Is Published

(OP)
How do you know if there is another one that is hidden? There has to be a better way...

RE: Check If Feature Is Published

Quote (lardman363)

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

RE: Check If Feature Is Published

(OP)
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.

RE: Check If Feature Is Published

(OP)
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.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources