Форум: "Corba";
Текущий архив: 2005.12.25;
Скачать: [xml.tar.bz2];
ВнизВыделить оъект в Акаде Найти похожие ветки
← →
Yagovdik (2005-01-11 15:04) [0]Необхдимо выделить несколько оъектов, вписанных в прямоугольник (х,у,0) и (х1, у1, 0)
вт пример из акадовского хелпа на басике
" This example adds members to a selection set first by crossing and
" then by filtering for circles.
" Create the selection set
Dim ssetObj As AcadSelectionSet
Set ssetObj = ThisDrawing.SelectionSets.Add("SSET")
" Add all entities that lie within a crossing of (28,17,0) and
" (-3.3, -3.6,0) to the selection set
Dim mode As Integer
Dim corner1(0 To 2) As Double
Dim corner2(0 To 2) As Double
mode = acSelectionSetCrossing
corner1(0) = 28: corner1(1) = 17: corner1(2) = 0
corner2(0) = -3.3: corner2(1) = -3.6: corner2(2) = 0
ssetObj.Select mode, corner1, corner2
вот описалово функции:
object.Select Mode[, Point1][, Point2][, FilterType][, FilterData]
Object
SelectionSet
The object or objects this method applies to.
Mode
AcSelect enum; input-only
acSelectionSetWindow
acSelectionSetCrossing
acSelectionSetPrevious
acSelectionSetLast
acSelectionSetAll
Point1
Variant (array of doubles); input-only; optional
The 3D WCS coordinates, or array of coordinates, specifying Point1. See the mode definitions above for the proper use of Point1.
Point2
Variant (three-element array of doubles); input-only; optional
The 3D WCS coordinates specifying Point2. See the mode definitions above for the proper use of Point2.
FilterType
Integer; input-only; optional
A DXF group code specifying the type of filter to use.
FilterData
Variant; input-only; optional
The value to filter on.
я написал вот что:
var
sset : AcadSelectionSet;
Point1, Point2 : OLEVAriant;
FT, FD : OLEVariant;
gpCode : array [1..1] of Integer;
dataValue : array [1..1] of Variant;
Begin
sset := Document.SelectionSets.Add("ss1");
Point1:= VarArrayCreate([0, 2],VarDouble);
Point2:= VarArrayCreate([0, 2],VarDouble);
Point1[0] := aX; Point1[1] := aY; Point1[2] := 0;
Point2[0] := aX+297; Point2[1] := aY+210; Point2[2] := 0;
gpCode[1] := 0;
DataValue[1] := "";
FT := gpCode[1];
FD := DataValue[1];
sset.Select(acSelectionSetCrossing,Point1,Point2,FT,FD);
end;
все компиляется но при выполнении процедуры ошибка "Инвалид Фильтер тайп"
null и nil не проходят
Вопрос наверне не совсем в тему, но наиболее прилижен по-моему
заранее спасибо
← →
GanibalLector © (2005-01-12 01:54) [1]>в Акаде
А ШО оно такое?Впервые слышу...
>null и nil не проходят
EmptyParam подойдет
← →
SeregaK (2005-03-03 16:05) [2]Тип для FT
FT := VarArrayCreate([0, 0],VarSmallint);
FT[0]:= 0
а для FD
FD := VarArrayCreate([0, 0],varVariant);
FD := "" наверно не пойдет, лучше использовать EmptyParam
← →
SeregaK (2005-03-03 16:06) [3]Тип для FT
FT := VarArrayCreate([0, 0],VarSmallint);
FT[0]:= 0
а для FD
FD := VarArrayCreate([0, 0],varVariant);
FD := "" наверно не пойдет, лучше использовать EmptyParam
Страницы: 1 вся ветка
Форум: "Corba";
Текущий архив: 2005.12.25;
Скачать: [xml.tar.bz2];
Память: 0.45 MB
Время: 0.012 c