Suspect Code: (part of a larger script) ' === Arrow Properties === If line.Style.AllowArrow.Value = False Then 'do nothing: no arrowheads by default Else
Dim iArrowHeads As New Corel.Interop.VGCore.ArrowHeads ' ***BREAKS HERE*** ' Arrowhead start If line.Style.StartArrowType.Value <> 0 Then TargetShape.Outline.StartArrow = iArrowHeads.Item(line.Style.StartArrowType.Value) End If ' Arrowhead end If line.Style.StartArrowType.Value <> 0 Then TargetShape.Outline.EndArrow = iArrowHeads.Item(line.Style.EndArrowType.Value) End If End IfRunning the above script results in the following errorSystem.Runtime.InteropServices.COMException: 'Retrieving the COM class factory for component with CLSID {DE3D0007-FEE3-4EC0-9845-53D17354AE24} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).'I am using a heavily modified Bonus630 Corel Template for Dockers in Visual Studio2022.All other Corel.Interop.VGCore classes/interfaces appear to function as expected.I am unsure how to proceed with this as it appears to be a Corel issue unless I am mistaken.Any suggestions would be appreciated.
COM works with interfaces, and you cannot instantiate an interface.
use corelApp.ArrowHeads properties from VGCore Application object
Application.ArrowHeads property - Developer Area - CorelDRAW Community
Fixed: ' Arrowhead start If line.Style.StartArrowType.Value <> 0 Then TargetShape.Outline.StartArrow = corelApp.Arrow.Item(line.Style.StartArrowType.Value) End If ' Arrowhead end If line.Style.StartArrowType.Value <> 0 Then TargetShape.Outline.EndArrow =corelApp.Arrow.Item(line.Style.EndArrowType.Value) End If End If