Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.
First time visiting? Here are some places to start:- Looking for a certain topic? Check out the categories filter or use Search (upper right).
- Need support? Ask a question to our Community Support category.
- Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
- Be respectful, on topic and if you see a problem, Flag it.
If you would like to contact our Community Manager personally, feel free to send a private message or an email.
Applying an appearance to entire part body rather than surface only...
Stormi_Backus
Member Posts: 49 ✭
I'm surprised I couldn't find anyone else on the forum having this issue but here we go...
How can I change the color of my entire part body rather than just the part's surface when applying an appearance?
I have a logo extrusion that appears as OnShape's default blue rather than the grey appearance I have applied. (See screenshot below). If this is something that can be done programmatically using FS, that would be nice - this is an FS generated part anyway.
Thanks in advance!
How can I change the color of my entire part body rather than just the part's surface when applying an appearance?
I have a logo extrusion that appears as OnShape's default blue rather than the grey appearance I have applied. (See screenshot below). If this is something that can be done programmatically using FS, that would be nice - this is an FS generated part anyway.
Thanks in advance!
0
Best Answer
-
MichaelPascoe Member Posts: 1,988 PRO
You could set the appearance in either. Since your logo feature isn't referencing the part, it would be extra clicks if you put it there. Add this to line 554 of the gear feature and that will set it's color.
https://cad.onshape.com/documents/97df39c5762995b372a45f6b/w/74fd179228f3f388ca4bf66a...setProperty(context, { "entities" : qCreatedBy(id + "APlateExtrusion", EntityType.BODY), "propertyType" : PropertyType.APPEARANCE, "value" : color(.3, .3, .3) });
Learn more about the Gospel of Christ ( Here )
CADSharp - We make custom features and integrated Onshape apps! Learn How to FeatureScript Here 🔴0
Answers
@Stormi_Backus each of these things you mentioned are possible. Please share a link to your document so we can take a closer look.
Perhaps your custom feature is extruding separate parts instead of merging the logo with the main part? It's hard to tell without the context of a document.
If you share a link to your custom feature we can help you with that too. SetProperty() is how you can change the appearance of parts created within FeatureScript.
Learn more about the Gospel of Christ ( Here )
CADSharp - We make custom features and integrated Onshape apps! Learn How to FeatureScript Here 🔴
https://cad.onshape.com/documents/51d4a2a74f19d96e738a7a86/w/0cffaf06f18f5433f9dce56d/e/4122ee75c726579bc9fffe0c?renderMode=0&uiState=652d781765fd8f1209449453
Here is the link to the logo FS: https://cad.onshape.com/documents/1c864a0f76cc68fc6a77ba31/w/dff5ee744601abbaacb0232f/e/a1bef027f56bc0bbd87e274b?renderMode=0&uiState=652d79836813a23d236d82f8
You could set the appearance in either. Since your logo feature isn't referencing the part, it would be extra clicks if you put it there. Add this to line 554 of the gear feature and that will set it's color.
https://cad.onshape.com/documents/97df39c5762995b372a45f6b/w/74fd179228f3f388ca4bf66a...
Learn more about the Gospel of Christ ( Here )
CADSharp - We make custom features and integrated Onshape apps! Learn How to FeatureScript Here 🔴