I got the message :
"Windows" is ambiguous in namespace "Intellicad", must be completely identified.
Re: "Windows" is ambiguous in namespace "Intellicad"
#2You got such message doing what, and using what IntelliCAD version?
Re: "Windows" is ambiguous in namespace "Intellicad"
#3Intellicad 9.2.730.112619.PE+.VC15.x64.CMS92a
for example, trying to access ColorDialog
Dim f As New IntelliCAD.Windows.ColorDialog
but there is other vars and dialogs winth this message
for example, trying to access ColorDialog
Dim f As New IntelliCAD.Windows.ColorDialog
but there is other vars and dialogs winth this message
Re: "Windows" is ambiguous in namespace "Intellicad"
#5Please show your code, Denis.DenisSilveira wrote: ↑Sat May 30, 2020 9:20 pmI got the message :
"Windows" is ambiguous in namespace "Intellicad", must be completely identified.
Re: "Windows" is ambiguous in namespace "Intellicad"
#6QuanNguyen wrote: ↑Sun May 31, 2020 11:56 pmPlease show your code, Denis.DenisSilveira wrote: ↑Sat May 30, 2020 9:20 pmI got the message :
"Windows" is ambiguous in namespace "Intellicad", must be completely identified.
Code: Select all
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim f As New IntelliCAD.Windows.ColorDialog
If Not f.ShowDialog = Windows.Forms.DialogResult.OK Then
Exit Sub
End If
If f.Color.IsByAci Then
If f.Color.IsByLayer Then
Button1.Text = "ByLayer"
ElseIf f.Color.IsByBlock Then
Button1.Text = "ByBlock"
Else
Button1.BackColor = AcadColorAciToDrawingColor(f.Color)
End If
Else
Dim colIndex As Integer = f.Color.ColorIndex
Dim byt As System.Byte = System.Convert.ToByte(colIndex)
Dim rgb As Integer = Teigha.Colors.EntityColor.LookUpRgb(byt)
Dim b As Long = (rgb And &HFFL) / 2 ^ 8
Dim g As Long = (rgb And &HFF00L) / 2 ^ 8
Dim r As Long = rgb / 2 ^ 16
Button1.BackColor = System.Drawing.Color.FromArgb(r, g, b) ' String.Format("{0}-{1}-{2}", r.ToString(), g.ToString(), b.ToString())
End If
Globais.CorPerfil = f.Color
End Sub
I found namespace "IntelliCAD.Windows" in the VS Object Explorer at two DLLs:
Namespace IntelliCAD.Windows
Membro de IcMgd_4.3_15
Namespace IntelliCAD.Windows
Membro de IcCoreMgd_4.3_15
Otherwise supressing "IcadAuto.interop.dll" the message desapear, but I don't know if lost any operation at this DLL. The original plugins in Autocad uses Acad.Interop.
At the Microsoft VS help says to complete identify the DLL but its name has a DOT wich causes a problema when typing the DLL name before namespace.
It's pretty dificult.
Re: "Windows" is ambiguous in namespace "Intellicad"
#7Code: Select all
Public Sub teste()
Dim doc As Document = IntelliCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument
Dim db As Database = doc.Database
Dim Col As New Collection
Using tr As Transaction = IntelliCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.TransactionManager.StartTransaction
Dim vt As ViewTable = tr.GetObject(db.ViewTableId, Teigha.DatabaseServices.OpenMode.ForRead)
For Each vti In vt
Dim vtr As ViewTableRecord = TryCast(tr.GetObject(vti, Teigha.DatabaseServices.OpenMode.ForRead), ViewTableRecord)
If Not IsNothing(vtr) Then
Col.Add(vtr)
End If
Next
Dim aView As ViewTableRecord = tr.GetObject(Col(1).objectid, Teigha.DatabaseServices.OpenMode.ForRead)
Dim fileDia As New IntelliCAD.Windows.SaveFileDialog(
"Open an Image file", Nothing,
"jpg; gif; tif; bmp", "Image File",
IntelliCAD.Windows.
OpenFileDialog.OpenFileDialogFlags.NoUrls)
' Show the dialog and test the result
Dim res As System.Windows.Forms.DialogResult =
fileDia.ShowDialog()
If res <> System.Windows.Forms.DialogResult.OK Then Return
aView.Thumbnail.Save(fileDia.Filename)
Dim Raster As New RasterImageDef
Raster.SourceFileName = "bitMarTemp"
Raster.Load()
Dim imageDictId As ObjectId =
RasterImageDef.GetImageDictionary(db)
If imageDictId.IsNull Then
' Image dictionary doesn't exist, create new
imageDictId = RasterImageDef.CreateImageDictionary(db)
End If
Dim imageDict As DBDictionary = tr.GetObject(
imageDictId, Teigha.DatabaseServices.OpenMode.ForRead)
Dim imageDef As RasterImageDef
Dim imageDefId As ObjectId
Dim dictName As String = "IMAGE"
imageDef = New RasterImageDef()
' And set its source image
imageDef.SourceFileName = "bitMarTemp" 'fileDia.Filename()
' finally load it
imageDef.Load()
imageDict.UpgradeOpen()
imageDefId = imageDict.SetAt(dictName, imageDef)
tr.AddNewlyCreatedDBObject(imageDef, True)
' Now create the raster image that references the definition
Dim image As New RasterImage()
image.ImageDefId = imageDefId
Dim X = "353917.0678034420"
Dim Y = "398701.9004743111"
Dim uCorner As New Vector3d(366, 0, 0)
Dim vOnPlane As New Vector3d(0, 278, 0)
Dim point As New Point3d(X, Y, 0.0)
Dim coordinateSystem As New CoordinateSystem3d(point, uCorner, vOnPlane)
image.Orientation = coordinateSystem
' And some other properties
image.ImageWidth.ToString(366)
image.ImageHeight.ToString(278)
image.ImageTransparency = True
image.ShowImage = True
' Add the image to ModelSpace
Dim bt As BlockTable = tr.GetObject(db.BlockTableId, Teigha.DatabaseServices.OpenMode.ForRead)
Dim msBtr As BlockTableRecord = tr.GetObject(bt(BlockTableRecord.ModelSpace), Teigha.DatabaseServices.OpenMode.ForWrite)
msBtr.AppendEntity(image)
tr.AddNewlyCreatedDBObject(image, True)
RasterImage.EnableReactors(True)
image.AssociateRasterDef(imageDef)
Dim jigger As New EntitiesJig.AcadNetAddinCS.MoveRotationScaleJig
jigger.AddEntity(image)
jigger.Jig()
tr.Commit()
End Using
'Dim img = IntelliCAD.Internal.Utils.CreateIcon(vtr, width - 120, height, Color.White)
End Sub
Dim fileDia As New IntelliCAD.Windows.SaveFileDialog(
"Open an Image file", Nothing,
"jpg; gif; tif; bmp", "Image File",
IntelliCAD.Windows.
OpenFileDialog.OpenFileDialogFlags.NoUrls)
Causes this problem.
Code line "aView.Thumbnail.Save(fileDia.Filename)" generates an error because aView.thumbnail is set to nothing.
I am trying to generate a Bitmap os predefined Views inside DWg PaperSpace file ... after that I'll try to produce a commandMethod to insert View inside Drawing PS just by two clicks.
First of all need to collect information about view and generate BitMap to user drag and drop over screen of any PS drawing. I am trying to use raster image to insert at PS 0,0,0 and then using JigEntity to user drag it around the DWG screen.
After user click at any place, information collected before will be used to append Xref file and creates ViewPort (PaperSpace)
Re: "Windows" is ambiguous in namespace "Intellicad"
#8Please add the assembly System.Drawing to your project then it works.DenisSilveira wrote: ↑Mon Jun 01, 2020 12:04 pm....................
Also, line code :
Dim fileDia As New IntelliCAD.Windows.SaveFileDialog(
"Open an Image file", Nothing,
"jpg; gif; tif; bmp", "Image File",
IntelliCAD.Windows.
OpenFileDialog.OpenFileDialogFlags.NoUrls)
Causes this problem.
Code line "aView.Thumbnail.Save(fileDia.Filename)" generates an error because aView.thumbnail is set to nothing.
.................................
Re: "Windows" is ambiguous in namespace "Intellicad"
#9It is not even compiling ... not running ... the problem is to identify "Intellicad.Windows" to compilerQuanNguyen wrote: ↑Mon Jun 01, 2020 6:16 pmPlease add the assembly System.Drawing to your project then it works.DenisSilveira wrote: ↑Mon Jun 01, 2020 12:04 pm....................
Also, line code :
Dim fileDia As New IntelliCAD.Windows.SaveFileDialog(
"Open an Image file", Nothing,
"jpg; gif; tif; bmp", "Image File",
IntelliCAD.Windows.
OpenFileDialog.OpenFileDialogFlags.NoUrls)
Causes this problem.
Code line "aView.Thumbnail.Save(fileDia.Filename)" generates an error because aView.thumbnail is set to nothing.
.................................
aView_Thumbnail.png
Re: "Windows" is ambiguous in namespace "Intellicad"
#10It should work as it was.
Please refer to my setting for v9.2 :
Please refer to my setting for v9.2 :
- Attachments
-
- IntelliCAD9 references.png (4.3 KiB) Viewed 5573 times