Page 1 of 1
XYZ letters on axes
Posted: Wed Jun 19, 2024 1:18 am
by GasGas
Hello
I cannot get the "XYZ" names to appear in the global frame. When I access GetExtendedProperties() in kernCad the compiler states "not such interface". What I am doing wrong?
I am using v7.1 .net activeX control in a VB application.
Thanks
Re: XYZ letters on axes
Posted: Wed Jun 19, 2024 2:46 am
by Prashant Kande
Hello GasGas.
It seems to be working in v6.2 Lines sample with DGK 7.1 installed:
http://dynoinsight.com/Data/Lines_VBnetAXv62.zip
The sample has Options > 'Customise Global Axes' in the menu handled in:
Code: Select all
Private Sub customizeGlobalAxesToolStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs) Handles customizeGlobalAxesToolStripMenuItem.Click
Dim iView As IView_DG = m_kernCAD.GetView()
Dim iPropArray As IPropertyArray = iView
Dim iContextAxes As IKCContext = iPropArray.GetProperty("GlobalAxes")
Dim toggle As Boolean = Not iContextAxes.GetBoolParam(1)
iContextAxes.SetBoolParam(1, toggle)
iContextAxes.SetBoolParam(3, toggle)
iContextAxes.SetDoubleParam(0, If(Not toggle, 0.5, 1.0))
Dim iFont As IDIFont = iContextAxes
If Not iFont Is Nothing Then
iFont.SetSize(20)
End If
SwapAxesOrientation(iContextAxes)
m_kernCAD.UpdateView()
customizeGlobalAxesToolStripMenuItem.Checked = toggle
End Sub
Regards
Re: XYZ letters on axes
Posted: Wed Jun 19, 2024 3:02 am
by Prashant Kande
BTW, for other readers to be aware:
DGK 7.1 includes three controls. Two ActiveX ones KerCADe.ocx (intended for native apps only) and KerCADne.ocx (targets .NET Framework). They can actually be used in either kind of apps. The thirds one is DGKC. It us pure .NET control (which loads native core assembly via interop).
In v7.2 we will have the fourth one DGKCn6 which targets .NET 6.0 (Core).
The installed samples are based on the latest control only. To find a sample for an older control (KerCADne.ocx in your case), the best way is to install an older version (v6.2 in your case) side by side or temporarily and use samples from there.
When two versions are installed side by side you need to be aware which version is currently active. To be sure just execute the "Update Cmponent Registration" as admin in the version you intend to use next.
Registration matters only during startup of an app. So, you can, say activate v6.2, start a sample there. And while it is running you can activate v7.1 and start debugging your app simultaneously.
See also:
Side by side,
Older samples.