-
FlexPro
- Auf einen Blick
- Features & Optionen
- Einsatzgebiete
- Alle Vorteile
- Neu in FlexPro 2021
- FlexPro gratis testen
- FlexPro View OEM Freeware
- Kaufberatung
- Login
- Language
- +49 6894 929600
- infoweisang.com
- Google Maps
- Produkte
- News
- Support
- Unternehmen
- Jobs
- Kontakt
- Login
- Language
- +49 6894 929600
- infoweisang.com
- Google Maps
Axis problems
Home > Community > Automation and VBA > Axis problems
- Dieses Thema hat 5 Antworten sowie 2 Teilnehmer und wurde zuletzt vor vor 17 Jahren von Gordon Leonard aktualisiert.
-
AutorBeiträge
-
November 7, 2007 um 3:11 am Uhr #12399Gordon LeonardTeilnehmer
Here we go, whilst using the 30 day trial, i don’t have long to find out what FlexPro is like etc and I do like forums so will be on here a lot, probably with lots of repeated questions. The only way i have found to search the forum is to go via google which often pops up with results linking back here.
I have created a flexpro object within VB, then created a dataset and populated it with values. I will mainly be plotting column x against y, so have set up a “.DataStructure = fpDataStructureDataMatrix” with 2 columns and pass it a VB array like DataArry(1,100): .Value(fpDataComponentAll) = DataArray. Is this the best way to do it?
I have then plotted the dataset on a ‘diagram2d’ which is where my first issue comes up. If the first element in the array (at (0,0)) is (130,-99) for instance, the axis starts at 0,0 (or atleast the ticks say (0,0)) where i would have expected them to show that the first point is at (130,-99). I hope i have explained myself. I am obviously missing something but have not worked out what?
Thanks in advance
Gordon
November 7, 2007 um 3:11 am Uhr #8082Gordon LeonardTeilnehmerHere we go, whilst using the 30 day trial, i don’t have long to find out what FlexPro is like etc and I do like forums so will be on here a lot, probably with lots of repeated questions. The only way i have found to search the forum is to go via google which often pops up with results linking back here.
I have created a flexpro object within VB, then created a dataset and populated it with values. I will mainly be plotting column x against y, so have set up a “.DataStructure = fpDataStructureDataMatrix” with 2 columns and pass it a VB array like DataArry(1,100): .Value(fpDataComponentAll) = DataArray. Is this the best way to do it?
I have then plotted the dataset on a ‘diagram2d’ which is where my first issue comes up. If the first element in the array (at (0,0)) is (130,-99) for instance, the axis starts at 0,0 (or atleast the ticks say (0,0)) where i would have expected them to show that the first point is at (130,-99). I hope i have explained myself. I am obviously missing something but have not worked out what?
Thanks in advance
Gordon
November 7, 2007 um 6:31 pm Uhr #8630Bernhard KantzTeilnehmerPlease use the data structure ‘Signal’ instead of ‘data matrix’.
... .DataStructure = fpDataStructureSignal ...
A signal has a Y-component and a X-component, each with a data set of the same length.
If you create a 2D-diagram for a signal, it’s not necessary to enter the dataset for the X-component in the diagram wizard.
But if you want to create a 2D-diagram for a data matrix (first column: Y-component, second column: X-component) you have to enter the X- and the Y-component:
The Y-component is matrix[0] and the X-component is matrix[1].Please see also
FlexPro Help (F1)
Working with Data SetsNovember 7, 2007 um 9:14 pm Uhr #8631Gordon LeonardTeilnehmerThanks for the reply.
At the moment a signal, with 2 columns will not plot y against x. (it actually plots something that looks right, but clearly isn’t!)
##code:
datasignal.Value(fpDataComponentAll) = datarr
2dgraph.Curves.Add.Data.dataset= “data1”
##the closest i have got is to create any type of data structure, then use the flexpro gui to choose to plot data1[0] against data1[1], although i dont know how to do this in terms of vb objects (i want to tell the plot i want to use “seperate data sets for x and y comps”):
pseudo code:
2dgraph.Curves.Add.Data.XAxis= “data1[0]”
2dgraph.Curves.Add.Data.YAxis= “data1.Y[1]”
endNovember 7, 2007 um 9:54 pm Uhr #8632Bernhard KantzTeilnehmerUse the Composed-property. ‘data1’ is a signal.
Dim oDiagram As Diagram2D Set oDiagram = ActiveDatabase.RootFolder.Add("2D-Diagram", fpObjectType2DDiagram) With oDiagram.Curves.Add.Data .Composed = True .DataSet = "data1.Y" .XDataSet = "data1.X" End With oDiagram.Update
The macro recorder is the most convenient way of creating a macro. Even if you are working with FlexPro Professional and have the Visual Basic Editor available for programming, it makes sense to start with a macro recording and to modify the code later, if necessary.
See also
Automating Task|Creating and Using MacrosNovember 7, 2007 um 10:06 pm Uhr #8633Gordon LeonardTeilnehmeryou won’t believe me, but i have just worked that out from the help, i wasn’t sure if it was the best way to do things.
i’ll look in to recording macros using this example so i can work out what is going on.
Thanks!!!!!!
-
AutorBeiträge
- Du musst angemeldet sein, um auf dieses Thema antworten zu können.