AcGePoint3dArray, AcArray

AcGePoint3dArray, AcArray

Anonymous
Not applicable
1,055 Views
3 Replies
Message 1 of 4

AcGePoint3dArray, AcArray

Anonymous
Not applicable
Hi Are there any limitations in using AcArray (AcGePoint3dArray) in dbx Projects ?? Coz .. I have some Custom Entity classes up to now i have used AcGePoint3d classes to store my entity points, but in few new entitis i have variant points count. So i have looked, and found the AcArray class. Its all nice but now i have coded my custom entities and have trouble with this. My first entity works ok, the second works to create, but if i try to copy, move or somthing else Autocad crashes. I have debuged it and it crashes exact after first dwgOutFields passes.
0 Likes
1,056 Views
3 Replies
Replies (3)
Message 2 of 4

Anonymous
Not applicable
Hi, Problems with AcArray is often the default memcopy allocator should not be used. Here's a useful macro: #define AcArrayObj(type) AcArray > Try that, so instead of using: AcArray myVar use instead: AcArrayObj(someDataType) myVar Hope that helps, Andrew "rex12" wrote in message news:40b610f7_2@newsprd01... > Hi > > Are there any limitations in using AcArray (AcGePoint3dArray) in dbx > Projects ?? > > Coz .. > > I have some Custom Entity classes up to now i have used AcGePoint3d classes > to store my entity points, but in few new entitis i have variant points > count. So i have looked, and found the AcArray class. Its all nice but now i > have coded my custom entities and > have trouble with this. My first entity works ok, the second works to > create, but if i try to copy, move or somthing else Autocad crashes. > I have debuged it and it crashes exact after first dwgOutFields passes. > >
0 Likes
Message 3 of 4

Anonymous
Not applicable
Well it didint help :(. I have tryed it on a new entity and it didint help. Now i'm realy wired. Now when i try to add my new coded entity Autocad crashes by first worldDraw pass. In my overriden fonktion i have a loop like this : for(int i=0; i<6; i++) // for a try i have set a fix points count { tmpPt[1]=EckPoints; tmpPt[2]=EckPoints[i+1]; mode->geometry().worldLine(tmpPt); } Befor the first pass my EckPoints Array is valid, but after first pass it suddenly is invalid ??? And i dont understand it. May it be that the Autocad have trouble with Objects with dynamically allocated memory ?? Any Clue ?? Regards Rex
0 Likes
Message 4 of 4

Anonymous
Not applicable
Sorry that was my mistake ;) Was tmpPt[2] !!! Now its work fine. I thing i must look more carefuly on my code ;) Regards Rex "rex12" schrieb im Newsbeitrag news:40b6e929_2@newsprd01... > Well it didint help :(. > > I have tryed it on a new entity and it didint help. Now i'm realy wired. Now > when i try to add my new coded entity Autocad crashes by first worldDraw > pass. In my overriden fonktion i have a loop like this : > > for(int i=0; i<6; i++) // for a try i have set a fix points count > { > tmpPt[1]=EckPoints; > tmpPt[2]=EckPoints[i+1]; > mode->geometry().worldLine(tmpPt); > } > > Befor the first pass my EckPoints Array is valid, but after first pass it > suddenly is invalid ??? > And i dont understand it. > > May it be that the Autocad have trouble with Objects with dynamically > allocated memory ?? > Any Clue ?? > > Regards > Rex > >
0 Likes