Hi everyone!!I have this code , First I promote a point cell feature from a SharedCell , then I´ve triying to read some properties like coordenates, cell name and others, and then add this cell properties to a feature properties. The rare thing is in a machine i have this error (430) but in other no and is the same DGN File, because i am in the prove fase. What is wrong in my code?I am using Bentley Map SS3.This is the code. Thanks!!!
Set fe = locateOp.GetLocatedFeatures Set ee = ActiveDesignFile.Fence.GetContents With oFeature .AddToTransientAsHilited .ApplyAttributeChanges Do ' -------- Set oCell = ee.Current If oCell.IsSharedCellDefinitionElement Then ShowMessage "This elemen is SharedCellDefinitionElement", "", msdMessageCenterPriorityInfo, True End If If (oCell.IsSharedCellElement) Then If (oCell.AsSharedCellElement.Origin.X = .Geometry.AsSharedCellElement.Origin.X) And (oCell.AsSharedCellElement.Origin.Y = .Geometry.AsSharedCellElement.Origin.Y) Then '---------------------- Dim oCellNombre As String oCellName = oCell.AsSharedCellElement.Name Exit Do End If Else If oCell.IsCellElement Then If (oCell.AsCellElement.Origin.X = .Geometry.AsSharedCellElement.Origin.X) And (oCell.AsCellElement.Origin.Y = .Geometry.AsSharedCellElement.Origin.Y) Then '------ oCellName = oCell.AsCellElement.Name Exit Do End If End If End If ' Is shared cell element Loop While (ee.MoveNext) If .Geometry.Type = msdElementTypeSharedCell Or .Geometry.Type = msdElementTypeCellHeader Then ' --> Both .setProperty "CELLNAME", oCellName .setProperty "COORDX", .Geometry.AsSharedCellElement.Origin.X .setProperty "COORDY", .Geometry.AsSharedCellElement.Origin.Y setProperty = True End If
Are you saying the code works on another machine? If so, the code may not be the problem. Check the machine configuration, is the Operating System up to date? Check the Bentley software/MicroStation versions - are they the same on each PC? If this is still a problem please provide a test-case that we can try on our systems.
You are right Dan, I use SS3 and the other machine has SS4. I thought that for the SS4 could be more easy to work with a code writed in a Map older version. Thanks a lot!!! Regards!!!