/// <summary> /// Moves the cursor to the next shape instanceData that meets the criteria of the previous TrySeek call /// </summary> /// <param name="si"></param> /// <returns></returns> public bool TryMoveNextShapeInstance(ref IXbimShapeInstanceData si) { if (Api.TryMoveNext(Sesid, Table)) { GetShapeInstanceData(si); return(true); } return(false); }
internal bool TrySeekShapeInstance(ref IXbimShapeInstanceData shapeInstance) { Api.JetSetCurrentIndex(Sesid, Table, instanceTablePrimaryIndex); if (Api.TryMoveFirst(Sesid, Table)) { GetShapeInstanceData(shapeInstance); return(true); } return(false); }
/// <summary> /// Moves the cursor to the next shape instance that meets the criteria of the previous TrySeek call /// </summary> /// <param name="si"></param> /// <returns></returns> public bool TryMoveNextShapeInstance(ref IXbimShapeInstanceData si) { if (Api.TryMoveNext(this.sesid, this.table)) { GetShapeInstanceData(si); return(true); } else { return(false); } }
private void GetShapeInstanceData(IXbimShapeInstanceData si) { Api.RetrieveColumns(Sesid, Table, _colValues); si.RepresentationContext = _colValRepresentationContext.Value.Value; si.InstanceLabel = Api.RetrieveColumnAsInt32(Sesid, Table, _colIdInstanceLabel).Value; si.IfcTypeId = _colValIfcTypeId.Value.Value; si.IfcProductLabel = _colValIfcProductLabel.Value.Value; si.StyleLabel = _colValStyleLabel.Value.Value; si.ShapeGeometryLabel = _colValShapeLabel.Value.Value; si.RepresentationType = _colValRepType.Value.Value; si.Transformation = _colValTransformation.Value; si.BoundingBox = _colValBoundingBox.Value; }
public bool TrySeekProductType(short productType, ref IXbimShapeInstanceData shapeInstance) { Api.JetSetCurrentIndex(Sesid, Table, productTypeIndex); Api.MakeKey(Sesid, Table, productType, MakeKeyGrbit.NewKey); if (Api.TrySeek(Sesid, Table, SeekGrbit.SeekGE)) { Api.MakeKey(Sesid, Table, productType, MakeKeyGrbit.NewKey | MakeKeyGrbit.FullColumnEndLimit); if (Api.TrySetIndexRange(Sesid, Table, SetIndexRangeGrbit.RangeUpperLimit | SetIndexRangeGrbit.RangeInclusive)) { GetShapeInstanceData(shapeInstance); return(true); } } return(false); }
/// <summary> /// xbimShapeInstanceData will contain the first shape instanceData of the specified product label /// </summary> /// <param name="context"></param> /// <param name="si"></param> /// <returns></returns> public bool TrySeekShapeInstanceOfGeometry(int shapeGeometryLabel, ref IXbimShapeInstanceData si) { Api.JetSetCurrentIndex(Sesid, Table, geometryShapeIndex); Api.MakeKey(Sesid, Table, shapeGeometryLabel, MakeKeyGrbit.NewKey); if (Api.TrySeek(Sesid, Table, SeekGrbit.SeekGE)) { Api.MakeKey(Sesid, Table, shapeGeometryLabel, MakeKeyGrbit.NewKey | MakeKeyGrbit.FullColumnEndLimit); if (Api.TrySetIndexRange(Sesid, Table, SetIndexRangeGrbit.RangeUpperLimit | SetIndexRangeGrbit.RangeInclusive)) { GetShapeInstanceData(si); return(true); } } return(false); }
/// <summary> /// xbimShapeInstanceData will contain the first shape instanceData in the specified context /// </summary> /// <param name="context"></param> /// <param name="si"></param> /// <param name="retrieveAll">if false only retrieve the key index data for speed, if true all data is returned</param> /// <returns></returns> public bool TrySeekShapeInstance(int context, ref IXbimShapeInstanceData si) { Api.JetSetCurrentIndex(Sesid, Table, instanceTablePrimaryIndex); Api.MakeKey(Sesid, Table, context, MakeKeyGrbit.NewKey); if (Api.TrySeek(Sesid, Table, SeekGrbit.SeekGE)) { Api.MakeKey(Sesid, Table, context, MakeKeyGrbit.NewKey | MakeKeyGrbit.FullColumnEndLimit); if (Api.TrySetIndexRange(Sesid, Table, SetIndexRangeGrbit.RangeUpperLimit | SetIndexRangeGrbit.RangeInclusive)) { GetShapeInstanceData(si); return(true); } } return(false); }
/// <summary> /// xbimShapeInstanceData will contain the first shape instance of the specified product label /// </summary> /// <param name="product"></param> /// <param name="si"></param> /// <returns></returns> public bool TrySeekShapeInstanceOfProduct(int product, ref IXbimShapeInstanceData si) { Api.JetSetCurrentIndex(sesid, table, productIndex); Api.MakeKey(sesid, table, product, MakeKeyGrbit.NewKey); if (Api.TrySeek(sesid, table, SeekGrbit.SeekGE)) { Api.MakeKey(sesid, table, product, MakeKeyGrbit.NewKey | MakeKeyGrbit.FullColumnEndLimit); if (Api.TrySetIndexRange(sesid, table, SetIndexRangeGrbit.RangeUpperLimit | SetIndexRangeGrbit.RangeInclusive)) { GetShapeInstanceData(si); return(true); } } return(false); }
public bool TrySeekSurfaceStyle(int context, int surfaceStyle, ref IXbimShapeInstanceData shapeInstance) { Api.JetSetCurrentIndex(sesid, table, instanceTablePrimaryIndex); Api.MakeKey(sesid, table, context, MakeKeyGrbit.NewKey); Api.MakeKey(sesid, table, surfaceStyle, MakeKeyGrbit.None); if (Api.TrySeek(sesid, table, SeekGrbit.SeekGE)) { Api.MakeKey(sesid, table, context, MakeKeyGrbit.NewKey); Api.MakeKey(sesid, table, surfaceStyle, MakeKeyGrbit.FullColumnEndLimit); if (Api.TrySetIndexRange(sesid, table, SetIndexRangeGrbit.RangeUpperLimit | SetIndexRangeGrbit.RangeInclusive)) { GetShapeInstanceData(shapeInstance); return(true); } } return(false); }
public int AddInstance(IXbimShapeInstanceData instance) { using (var update = new Update(sesid, table, JET_prep.Insert)) { _colValRepresentationContext.Value = instance.RepresentationContext; _colValIfcProductLabel.Value = instance.IfcProductLabel; _colValIfcTypeId.Value = instance.IfcTypeId; _colValShapeLabel.Value = instance.ShapeGeometryLabel; _colValStyleLabel.Value = instance.StyleLabel; _colValRepType.Value = instance.RepresentationType; _colValTransformation.Value = instance.Transformation; _colValBoundingBox.Value = instance.BoundingBox; Api.SetColumns(sesid, table, _colValues); instance.InstanceLabel = Api.RetrieveColumnAsInt32(sesid, table, _colIdInstanceLabel, RetrieveColumnGrbit.RetrieveCopy).Value; update.Save(); UpdateCount(1); } return(instance.InstanceLabel); }
private void GetShapeInstanceData(IXbimShapeInstanceData si) { Api.RetrieveColumns(sesid, table, _colValues); si.RepresentationContext = _colValRepresentationContext.Value.Value; si.InstanceLabel = Api.RetrieveColumnAsInt32(sesid, table, _colIdInstanceLabel).Value; si.IfcTypeId = _colValIfcTypeId.Value.Value; si.IfcProductLabel = _colValIfcProductLabel.Value.Value; si.StyleLabel = _colValStyleLabel.Value.Value; si.ShapeGeometryLabel = _colValShapeLabel.Value.Value; si.RepresentationType = _colValRepType.Value.Value; si.Transformation = _colValTransformation.Value; si.BoundingBox = _colValBoundingBox.Value; }
public bool TrySeekSurfaceStyle(int context, int surfaceStyle, ref IXbimShapeInstanceData shapeInstance) { Api.JetSetCurrentIndex(sesid, table, instanceTablePrimaryIndex); Api.MakeKey(sesid, table, context, MakeKeyGrbit.NewKey); Api.MakeKey(sesid, table, surfaceStyle, MakeKeyGrbit.None); if (Api.TrySeek(sesid, table, SeekGrbit.SeekGE)) { Api.MakeKey(sesid, table, context, MakeKeyGrbit.NewKey ); Api.MakeKey(sesid, table, surfaceStyle, MakeKeyGrbit.FullColumnEndLimit); if (Api.TrySetIndexRange(sesid, table, SetIndexRangeGrbit.RangeUpperLimit | SetIndexRangeGrbit.RangeInclusive)) { GetShapeInstanceData(shapeInstance); return true; } } return false; }
/// <summary> /// xbimShapeInstanceData will contain the first shape instance of the specified product label /// </summary> /// <param name="product"></param> /// <param name="si"></param> /// <returns></returns> public bool TrySeekShapeInstanceOfProduct(int product, ref IXbimShapeInstanceData si) { Api.JetSetCurrentIndex(sesid, table, productIndex); Api.MakeKey(sesid, table, product, MakeKeyGrbit.NewKey); if (Api.TrySeek(sesid, table, SeekGrbit.SeekGE)) { Api.MakeKey(sesid, table, product, MakeKeyGrbit.NewKey | MakeKeyGrbit.FullColumnEndLimit); if (Api.TrySetIndexRange(sesid, table, SetIndexRangeGrbit.RangeUpperLimit | SetIndexRangeGrbit.RangeInclusive)) { GetShapeInstanceData(si); return true; } } return false; }
/// <summary> /// Moves the cursor to the next shape instance that meets the criteria of the previous TrySeek call /// </summary> /// <param name="si"></param> /// <returns></returns> public bool TryMoveNextShapeInstance(ref IXbimShapeInstanceData si) { if (Api.TryMoveNext(this.sesid, this.table)) { GetShapeInstanceData(si); return true; } else return false; }
public int AddInstance(IXbimShapeInstanceData instance) { using (var update = new Update(sesid, table, JET_prep.Insert)) { _colValRepresentationContext.Value = instance.RepresentationContext; _colValIfcProductLabel.Value = instance.IfcProductLabel; _colValIfcTypeId.Value = instance.IfcTypeId; _colValShapeLabel.Value = instance.ShapeGeometryLabel; _colValStyleLabel.Value = instance.StyleLabel; _colValRepType.Value = instance.RepresentationType; _colValTransformation.Value = instance.Transformation; _colValBoundingBox.Value = instance.BoundingBox; Api.SetColumns(sesid, table, _colValues); instance.InstanceLabel = Api.RetrieveColumnAsInt32(sesid, table, _colIdInstanceLabel, RetrieveColumnGrbit.RetrieveCopy).Value; update.Save(); UpdateCount(1); } return instance.InstanceLabel; }