Hi, I'm out of idea to create a search criteria to get only the part in an assembly with contain 3D solid. I created a vba code to get all the coordinates off COG in a assembly but no way found yet to exclude a part that always existing in the assembly with contains only 3D sketches, no 3D datas and I'm must always delete this part on assembly before running the macro if not, the macro stop when trying to get datas on this part. If one have an idea, would be very helpfull
Solved! Go to Solution.
I'm not really following your workflow, but if you just need to skip a certain part couldn't you just put some kind of unique flag on it and use an if then block to check for the flag? I'm thinking custom iProp.
The Assembly name and part will change everytime...the only thing constant will be the word "layout" in the display name of the part I have to delete to run properly the macro.
Is there a way to skip the part with this flag ? King of vba command that check if the display name contains the word "layout" int the part displayname and skip it in the loop ?
It's hard to say without knowing how your going about what your doing, but I'll try.
Is "layout" always in the same spot in the name? i.e. always at the end like "my layout" or the begining? If not, the only way I know of hand is to loop through the name of every part which might get slow if you have a ton of parts.
You might use something like:
if right(varibaleHoldingPartName,6) <> "layout" then
whatever your doing
skip = false
for i = 6 to len(varibaleHoldingPartName)
if left(right(varibaleHoldingPartName,6),i) = "layout" then
skip = true
if skip = false then
whatever your doing
Then simply do a check on the displayname property like in my first example.
if left(displaynamevariable,11) <> "SEAT_LAYOUT" then
Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register
Start with some of our most frequented solutions to get help installing your software.