.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

activelayer in NET

3 REPLIES 3
Reply
Message 1 of 4
Anonymous
590 Views, 3 Replies

activelayer in NET

im coding a dll in VB.NET, working as a COM dll (it must run on various versions of ACAD, so i cant use managed code)

there is code that runs in my VB6 dll, but not in this VB.NET COM dll
it fails on ThisDrawing.ActiveLayer = CapaActual

anybody knows why?

Imports Autodesk.AutoCAD.Interop
Imports Autodesk.AutoCAD.Interop.Common
.....
xAcad = GetObject(, "AutoCAD.Application.16")
ThisDrawing = xAcad.ActiveDocument
.....
Dim sLayer As String
Dim CapaActual As AcadLayer
Dim CapaUsuario As AcadLayer

CapaUsuario = ThisDrawing.ActiveLayer
sLayer = ThisDrawing.ActiveLayer.Name
MsgBox(sLayer)
CapaActual = ThisDrawing.Layers.Add("0-IS-Indice")
ThisDrawing.ActiveLayer = CapaActual '<<<<
...

it also happen with

ThisDrawing.ActiveTextStyle = ThisDrawing.TextStyles.Item(sEstiloLetra)

thanks in advance
3 REPLIES 3
Message 2 of 4
Anonymous
in reply to: Anonymous

it also happen with

ThisDrawing.ActiveTextStyle = ThisDrawing.TextStyles.Item(sEstiloLetra)

thanks in advance
Message 3 of 4
Mikko
in reply to: Anonymous

I think its formatted something like

ThisDrawing.SetVariable("CLAYER", 0-IS-Indice)
Message 4 of 4
Anonymous
in reply to: Anonymous

wow, it works
thanks a lot

there is a lot of stuff running about managed code in NET, but not about the new syntax for usual COM projects in NET

im really lost with this situation

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost