SIR,
At my project I use layers 0,240,241-247
I draw some objects on layer 0 All other layers are not visible, but they have objects on them.
I am using the commands
Einai_energo = cAvax1.GetSelectedHandlesArr(myHandles(), True)
Einai_energo = cAvax1.GetBoundsSelectedItems(xMin, yMin, zMax, xMax, yMax, zMax)
Einai_energo = cAvax1.CreateBlock(myHandles(), Pr_onoma_block, CSng(xMin), CSng(yMin))
after using the createblock command All object on all layer are selected
How can I create the block using only the specified layer?
'and in greek
Ïôáí ÷ñçóéìïðïéÞóù ôéò ðáñáðÜíù åíôïëÝò ãéá íá öôéÜîù Ýíá block ìå áíôéêåßìåíá áðü ôï åðßðåäï 0 ´(ôá õðüëïéðá åðßðåäá åéíáé ìç ïñáôá) Ôï ôåëéêï block ðåñéÝ÷åé üëá ôá áíôéêåßìåíá áðï üëá ôá åðåßðåäá
ÊáëáñÜêçò Ìé÷áëçò
Page 1 of 1
CREATE BLOCK WITH ONE LAYER i WANT TO CREATE A BLOCK WITH OBJECT
#2
Posted 22 May 2005 - 02:48 PM
Hi,
You can choose the objects by their layers using "GetAttributes" function.
You can choose the objects by their layers using "GetAttributes" function.
Dim myHandles() As Long Dim iType() As AvaxItemType Dim iColor() As Integer, iWidth() As Integer, iStyle() As Integer Dim iLayer() As Integer, Elevation3D() As Single, Height3D() As Single Dim lMax As Long, lCnt As Long Dim xMin As Single, yMin As Single, zMin As Single Dim xMax As Single, yMax As Single, zMax As Single Dim lNewHandles() As Long, lCntNew As Long Dim GoodLayer As Integer Dim blockname As String lMax = cAvax1.GetSelectedHandlesArr(myHandles()) blockname = "test" GoodLayer = 0 If lMax <> 0 Then ReDim lNewHandles(lMax) Call cAvax1.GetAttributes(myHandles(), iType(), iColor(), iWidth(), iStyle(), iLayer(), Elevation3D(), Height3D()) For lCnt = 1 To lMax If iLayer(lCnt) = GoodLayer Then lCntNew = lCntNew + 1 lNewHandles(lCntNew) = myHandles(lCnt) End If Next lCnt If lCntNew > 0 Then ReDim Preserve lNewHandles(lCntNew) As Long If lMax <> lCntNew Then Call cAvax1.SelectItems(lNewHandles()) Call cAvax1.GetBoundsSelectedItems(xMin, yMin, zMin, xMax, yMax, zMax) Call cAvax1.CreateBlock(lNewHandles(), blockname, xMin, yMin) End If End If
Athanasios Gardos
Avax-Software.com
Avax-Software.com
Page 1 of 1
Sign In
Register
Help
Add Reply
MultiQuote