access polygon x,y values
access polygon x,y values
is there a way to access polygon x,y values using visual foxpro. The VB code example does not work
Any ideas
Any ideas
Re: access polygon x,y values
I can access all the polygon() properties except getpoints
which in the VB code works ok. Does anyone know how to get round this problem.
Thanks
which in the VB code works ok. Does anyone know how to get round this problem.
Thanks
Re: access polygon x,y values
Hello syren,
Can you explain exactly that you refer when you talk about polygon, so we can try to find a good solution of your problem? And also, I recommend you that take a look in Demo examples are included in TeeChartActivex build as you can find in: ...\TeeChart Pro v2010 ActiveX Control\Examples\Visual FoxPro.
Thanks,
Can you explain exactly that you refer when you talk about polygon, so we can try to find a good solution of your problem? And also, I recommend you that take a look in Demo examples are included in TeeChartActivex build as you can find in: ...\TeeChart Pro v2010 ActiveX Control\Examples\Visual FoxPro.
Thanks,
Best Regards,
Sandra Pazos / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Re: access polygon x,y values
Hi Sandra, Im using V8 activex
This is the code:
Creating the map:
FOR lnVertCount=thisform.oleShapeFile.Parts(lnThisPart).Begins TO thisform.oleShapeFile.Parts(lnThisPart).Ends
lnNoParts=thisform.oleShapeFile.Vertices(lnVertCount).PartNo
lnXCord=thisform.oleShapeFile.Vertices(lnVertCount).X_Cord
lnYCord=thisform.oleShapeFile.Vertices(lnVertCount).Y_Cord
lnZCord=thisform.oleShapeFile.Vertices(lnVertCount).Z_Cord
lnMeasure=thisform.oleShapeFile.Vertices(lnVertCount).Measure
thisform.oleChart.series(0).asMap.Shapes.Polygon(lnPolygon).Color=lnSeries0
thisform.oleChart.series(0).asMap.Shapes.Polygon(lnPolygon).Gradient.Visible=.T.
thisform.oleChart.series(0).asMap.Shapes.Polygon(lnPolygon).AddXY(lnXCord,lnYCord) && tmpPoints(i).X, tmpPoints(i).Y
thisform.oleChart.series(0).asMap.Shapes.Polygon(lnPolygon).Closed=.T.
NEXT
trying to read the created map:
FOR ln=0 TO lnPolygonCount
loShape=thisform.oleChart.Series(0).asMap.Shapes.Polygon(ln)
thisform.cntProgress.oleprogress.value=ln
IF loShape.Visible THEN
lcShape=UPPER(ALLTRIM(loShape.Text))
lnPolyIndex=loShape.index
lbState=loShape.closed
DIMENSION laPoints(10,2)
laPoints=loShape.getpoints(lnPolyIndex) - this fails
loShape.Color=lnColour
loShape.Gradient.Visible=.F.
ENDIF
NEXT
This is the code:
Creating the map:
FOR lnVertCount=thisform.oleShapeFile.Parts(lnThisPart).Begins TO thisform.oleShapeFile.Parts(lnThisPart).Ends
lnNoParts=thisform.oleShapeFile.Vertices(lnVertCount).PartNo
lnXCord=thisform.oleShapeFile.Vertices(lnVertCount).X_Cord
lnYCord=thisform.oleShapeFile.Vertices(lnVertCount).Y_Cord
lnZCord=thisform.oleShapeFile.Vertices(lnVertCount).Z_Cord
lnMeasure=thisform.oleShapeFile.Vertices(lnVertCount).Measure
thisform.oleChart.series(0).asMap.Shapes.Polygon(lnPolygon).Color=lnSeries0
thisform.oleChart.series(0).asMap.Shapes.Polygon(lnPolygon).Gradient.Visible=.T.
thisform.oleChart.series(0).asMap.Shapes.Polygon(lnPolygon).AddXY(lnXCord,lnYCord) && tmpPoints(i).X, tmpPoints(i).Y
thisform.oleChart.series(0).asMap.Shapes.Polygon(lnPolygon).Closed=.T.
NEXT
trying to read the created map:
FOR ln=0 TO lnPolygonCount
loShape=thisform.oleChart.Series(0).asMap.Shapes.Polygon(ln)
thisform.cntProgress.oleprogress.value=ln
IF loShape.Visible THEN
lcShape=UPPER(ALLTRIM(loShape.Text))
lnPolyIndex=loShape.index
lbState=loShape.closed
DIMENSION laPoints(10,2)
laPoints=loShape.getpoints(lnPolyIndex) - this fails
loShape.Color=lnColour
loShape.Gradient.Visible=.F.
ENDIF
NEXT
Re: access polygon x,y values
Hi Sandra, unfortunately the examples do not cover the map drawing so do not give me any clues.
Thanks
Thanks
Re: access polygon x,y values
Hello syren,
I have made a simple code that works fine for me. I have use next lines of code and Visual Studio FoxPro :
As you see in previous code you need add values previously to access in the Shapes.Polygon(0) points. Can you confirm, us if previous code works as you expected?
I hope will helps.
Thanks,
I have made a simple code that works fine for me. I have use next lines of code and Visual Studio FoxPro :
Code: Select all
Form1.OleControl1.Series(0).FillSampleValues()
Form1.OleControl1.Series(0).asMap.Shapes.Polygon(0).AddXY(0,4.99)
Form1.OleControl1.Series(0).asMap.Shapes.Polygon(0).AddXY(0,5.12)
Form1.OleControl1.Series(0).asMap.Shapes.Polygon(0).AddXY( 0,5.23)
Form1.OleControl1.Series(0).asMap.Shapes.Polygon(0).AddXY(0,5.1)
I hope will helps.
Thanks,
Best Regards,
Sandra Pazos / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Re: access polygon x,y values
Hi Sandra, I am adding using addXY and the polygons are being drawn. But a cannot read the points back from the polygon shape. I can read its text, color and visible state but not the points or count.
Or are you saying i must issue a fillsamplevalues before doing the addxy
Thanks
Andrew
Or are you saying i must issue a fillsamplevalues before doing the addxy
Thanks
Andrew
Re: access polygon x,y values
Hi Sandra, the code that allows me to add polygon is:
Form1.OleControl1.Series(0).FillSampleValues()
lnPolygon=Form1.OleControl1.Series(0).asMap.Shapes.Add
Form1.OleControl1.Series(0).asMap.Shapes.Polygon(lnPolygon).AddXY(0,4.99)
without line 2 the code will error.
if I execute:
lnX=Form1.OleControl1.Series(0).asMap.Shapes.Polygon(lnPolygon).GetPoints.Item.X
I get an ole error
Form1.OleControl1.Series(0).FillSampleValues()
lnPolygon=Form1.OleControl1.Series(0).asMap.Shapes.Add
Form1.OleControl1.Series(0).asMap.Shapes.Polygon(lnPolygon).AddXY(0,4.99)
without line 2 the code will error.
if I execute:
lnX=Form1.OleControl1.Series(0).asMap.Shapes.Polygon(lnPolygon).GetPoints.Item.X
I get an ole error
Re: access polygon x,y values
Hello syren,
I inform you that we have been investigating why in next line of code, appears an error when you try to execute it:
We will try to inform you asap about problem.
Thanks,
I inform you that we have been investigating why in next line of code, appears an error when you try to execute it:
Code: Select all
lnX=Form1.OleControl1.Series(0).asMap.Shapes.Polygon(lnPolygon).GetPoints.Item.X
Thanks,
Best Regards,
Sandra Pazos / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Re: access polygon x,y values
Does the 2010 version fix this or do you have a work around yet.
Many Thanks
Andrew
Many Thanks
Andrew
Re: access polygon x,y values
Hello syren,
Sorry for the delay. We have done many test and we have considered it as a bug. I have added it in bug list report with number (TA05015674) to be try fix it for next maintenance releases of TeeChartActivex.On the other hand,I recommend you to be aware at this forum, our RSS news feed, twitter and facebook accounts for new release announcements and what's implemented on them.
Thanks,
Sorry for the delay. We have done many test and we have considered it as a bug. I have added it in bug list report with number (TA05015674) to be try fix it for next maintenance releases of TeeChartActivex.On the other hand,I recommend you to be aware at this forum, our RSS news feed, twitter and facebook accounts for new release announcements and what's implemented on them.
Thanks,
Best Regards,
Sandra Pazos / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |