FlexPro
HistoryBase
Engineering
Training
Downloads
FlexPro-Support
Wissen
Community
Über Uns
Referenzen
Jobs
Allgemeiner Kontakt
Händlerverzeichnis
FlexPro-Support
DE
EN
FR
Placeholder
Produkte und Lösungen
Support und Downloads
Unternehmen
Magazin
Kontakt
Sprache
MyWeisang

Account Einstellungen

Topic

Axis problems

Anzeigen von 6-Stellen - 1 bis 6 (von insgesamt 6)
  • Autor
    Beiträge
  • #34871
    Gordon Leonard
    Teilnehmer

    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

    #34876
    Gordon Leonard
    Teilnehmer

    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

    #34872
    Bernhard Kantz
    Teilnehmer

    Please use the data structure ‘Signal’ instead of ‘data matrix’.
    [code]

    .DataStructure = fpDataStructureSignal

    [/code]
    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 Sets

    support@weisang.com

    #34873
    Gordon Leonard
    Teilnehmer

    Thanks 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]”
    end

    #34874
    Bernhard Kantz
    Teilnehmer

    Use the [b]Composed[/b]-property. ‘data1’ is a signal.
    [code]
    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
    [/code]

    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 Macros

    support@weisang.com

    #34875
    Gordon Leonard
    Teilnehmer

    you 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!!!!!!

Anzeigen von 6-Stellen - 1 bis 6 (von insgesamt 6)
  • Du musst angemeldet sein, um auf dieses Thema antworten zu können.