Necesito seleccionar varios patrones de sombreado en una vista en sección de dibujo y asignarles a todos los mismos valoresmediante VBasic pero no encuentro la manera de hacerlo. Por ejemplo, todos a 45 grados de ángulo y a 0,25 de escala.
Perdonar por mi mal ingles.
I need to select various shading patterns in a section view drawing and assign
all the same settings using VBasic but can not find the way to go. For example, all
a 45 degree angle and scale to 0.25.
Forgive for my bad English.
Unfortuately there is not currently any API support to access the hatching that's created as the result of a section. I don't know of any workarounds.
Somebody found a workaround yet?
Hello,
I'm having the same issue with Inventor 2017.
Is there a "vba" way to rotate all hatches after a view has been rotated?
Thanks
At the moment I do not see a solution since the inventor API does not give access to the subject of shading. But I have it among my main objectives.
Excuse my English from Google
De momento no le veo solución ya que el API de inventor no da acceso al tema de los sombreados. Pero lo tengo entre mis principales objetivos.
Perdone mi ingles de Google
Hi there its been a long time since the last post here.
Has anyone found a solution to this issue about batch rotating and scaling a hatch pattern yet ???
Kind Regards
If you have Inventor 2022 or onwards this should do:
oDDoc = ThisDrawing.Document
oSheet = oDDoc.ActiveSheet
For Each oView As DrawingView In oSheet.DrawingViews
If oView.ViewType = DrawingViewTypeEnum.kSectionDrawingViewType Then
Dim oSView As SectionDrawingView = oView
For Each oHatchR As DrawingViewHatchRegion In oSView.HatchRegions
'oHatchR.Angle
'oHatchR.BoundaryGeometries
'oHatchR.ByMaterial
'oHatchR.Color
'oHatchR.DoublePattern
'oHatchR.HatchAreas
'oHatchR.Layer
'oHatchR.LineWeight
'oHatchR.Pattern
'oHatchR.Scale
'oHatchR.Shift
'oHatchR.Visible
Next
End If
Next
the solution is from this post:
https://forums.autodesk.com/t5/inventor-programming-ilogic/accessing-quot-edit-hatch-pattern-quot-in...
Hello All
@cadman777 I have put together a code that will allow you to do the following.
First it asks you to select a view you would like to edit the hatching in, once you have picked a view the following pops up. (Note: this code will edit all hatches in that view)
I would like to be able to select a group of hatching to edit but am struggling to work that part out. Attached is the code if you want to use it.
I hope this is of help .
Sub Note 13/02/2024
I have attached a revised version of the code with enhanced user interface and features. You can now also adjust the hatch pattern.
Regards Brian.