-
FlexPro
- At a Glance
- Features & Options
- Applications
- All Advantages
- What’s New in FlexPro 2021
- Try FlexPro For Free
- FlexPro View OEM Freeware
- Buying Guide
- Login
- Language
- +49 6894 929600
- infoweisang.com
- Google Maps
- Products
- News
- Support
- Company
- Contact
- Login
- Language
- +49 6894 929600
- infoweisang.com
- Google Maps
"Active" diagram when worksheet not open
- This topic has 3 replies, 2 voices, and was last updated 21 years, 3 months ago by paulwarshawsky@yahoo.com.
-
AuthorPosts
-
August 22, 2003 at 6:56 am #12541paulwarshawsky@yahoo.comMember
I have written the following code in FPScript to integrate a flow signal to allow volume calibration. The first two marks indicate a segment of the file with no flow, in order to remove any offset in the signal, and then three “pumps” with a calibrated syringe are integrated, and the results returned. The problem I have is that if the WorkSheet is not open, there is no “Active” diagram, so “Marks=WorkSheet.WKS.MarksIndexX(0)” returns an empty set. This occurs even if the proper folder is active.
Any suggestions?
Thanks,
Paul Warshawsky
Dim Marks,Offset,V1,V2,V3,V4,V5,V6
Marks=WorkSheet.WKS.MarksIndexX(0)
Marks=Sort(Marks,SORT_X)
Offset=Average(c04[Marks[0],Marks[1]])
V1=(Integral(c04[Marks[1],Marks[2]]-Offset))[Marks[2]-Marks[1]]
V2=(Integral(c04[Marks[2],Marks[3]]-Offset))[Marks[3]-Marks[2]]
V3=(Integral(c04[Marks[3],Marks[4]]-Offset))[Marks[4]-Marks[3]]
V4=(Integral(c04[Marks[4],Marks[5]]-Offset))[Marks[5]-Marks[4]]V5=(Integral(c04[Marks[5],Marks[6]]-Offset))[Marks[6]-Marks[5]]
V6=(Integral(c04[Marks[6],Marks[7]]-Offset))[Marks[7]-Marks[6]]
Return({3/((V1+V3+V5-V2-V4-V6)/6), V1, V3, V5, V2, V4, V6})August 28, 2003 at 7:54 pm #8204paulwarshawsky@yahoo.comMemberI have written the following code in FPScript to integrate a flow signal to allow volume calibration. The first two marks indicate a segment of the file with no flow, in order to remove any offset in the signal, and then three “pumps” with a calibrated syringe are integrated, and the results returned. The problem I have is that if the WorkSheet is not open, there is no “Active” diagram, so “Marks=WorkSheet.WKS.MarksIndexX(0)” returns an empty set. This occurs even if the proper folder is active.
Any suggestions?
Thanks,
Paul Warshawsky
Dim Marks,Offset,V1,V2,V3,V4,V5,V6
Marks=WorkSheet.WKS.MarksIndexX(0)
Marks=Sort(Marks,SORT_X)
Offset=Average(c04[Marks[0],Marks[1]])
V1=(Integral(c04[Marks[1],Marks[2]]-Offset))[Marks[2]-Marks[1]]
V2=(Integral(c04[Marks[2],Marks[3]]-Offset))[Marks[3]-Marks[2]]
V3=(Integral(c04[Marks[3],Marks[4]]-Offset))[Marks[4]-Marks[3]]
V4=(Integral(c04[Marks[4],Marks[5]]-Offset))[Marks[5]-Marks[4]]V5=(Integral(c04[Marks[5],Marks[6]]-Offset))[Marks[6]-Marks[5]]
V6=(Integral(c04[Marks[6],Marks[7]]-Offset))[Marks[7]-Marks[6]]
Return({3/((V1+V3+V5-V2-V4-V6)/6), V1, V3, V5, V2, V4, V6})August 28, 2003 at 7:54 pm #8874Bernhard KantzParticipantAccessing the marks or cursors of a diagram in a worksheet or document is currently only possible if the worksheet or document is opened. In case of a document, the cursors have to be enabled too.
When accessing the marks, this restriction seems to be not necessary and we will try to find a way to remove it.
Until we change that behaviour, you need to open the worksheet for your formula to work properly. Maybe you can write a VBA event handler to automatically open the worksheet(s) when you open your database.
October 20, 2005 at 7:15 pm #8875Bernhard KantzParticipantThis problem has been solved in FlexPro 7. You can now access the cursors in a closed worksheet.
-
AuthorPosts
- You must be logged in to reply to this topic.