Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Raster mode visualization "shading"

Status
Not open for further replies.

AlvaroPers

Mechanical
Nov 29, 2020
30
I quote here a post with an unsolved question, at least for me.
thread560-460083

Does anyone knows how to change the raster mode option to "shading" programmatically?

Thanks,
Al.

 
Replies continue below

Recommended for you

Hi AlvaroPers.

Try this.
Code:
'vba

Option Explicit

Sub CATMain()

    Dim drawDoc As DrawingDocument
    Set drawDoc = CATIA.ActiveDocument
    
    Dim targetView As DrawingView
    Set targetView = drawDoc.sheets.ActiveSheet.views.ActiveView
    
    Dim behavior As DrawingViewGenerativeBehavior
    Set behavior = targetView.GenerativeBehavior
    
    behavior.ImageViewMode = CatImageViewMode.catImageModeShadingWithEdges
    
    behavior.Update

End Sub
 
Hello kantoku,
Thank you for replying,

The only options the generative object offers to me for ImageViewMode are: "catImageModeHRD" and "catImageModeOff"

There is no "catImageModeShadingWithEdges"

Did the code work for you?

Please, let me know,
Thank you
 
 https://files.engineering.com/getfile.aspx?folder=e931af02-5b7a-4eda-bc2b-52da8b6a5aa5&file=Capture.JPG
AlvaroPers.

In my environment it shows 6.
Is it a licensing issue? I am using HD2.
1_ngyrcf.png
2_3_wj3wqo.png
 
Interesting that I just have 3 constants, and you have 6.
I have HD2.
I'm using Visual Basic under Visual Studio 2022. See the attachment.
The namespace is DRAFTINGITF, so it's the same as yours.
I don't know why I don't have the others constantans.
I'm gonna make a try using a different environment and see what happens.


 
 https://files.engineering.com/getfile.aspx?folder=47d063e0-0014-4a5f-96f0-dad9734e28d7&file=Capture.PNG
I am using R2018.
I checked to see if there were any R2015s left and there were only two.
1_ldqbmt.png
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor