calculate date difference

J

j-in-uk

hi,

i have a begin date and an end date, i need 2 drag tasks from a stencil
onto the page and place it between these dates. i need to calculate the
datetime a specific task is positioned at.

my units of measure is visyards.
I'm assuming, i have to convert my endX & beginX values to visdate to
calculate the date value.
any directions as to where i can start or eg. pls

thanks
 
A

Al Edlund

wouldn't it be easier to just use the timeline functions in the project
schedule templates?
al
 
J

j-in-uk

hi Al,

Thanks for responding. I'm looking at the project schedule templates,
seems like something i can use. I am developing in .net and using the
microsoft.office.interop.visio component,which works fine as an addin.
My visio version is enterprise architects 10.0.2705.

Two questions,
1)can i drop predefined tasks shapes onto the project schedule stencil?
(only so that when i drag these tasks to the page it should have the
dates from the timeline)
2)how do i get the timeline 2 display in hours (configure timeline
seems to have the days as a minimum option)

thanks
 
J

j-in-uk

hi,

i did manage to drop my predefined tasks with a few of the timeline
stencil items in one stencil.
Now i need to know what user defined fields do i need to set in my task
stencil items, that would match
to my timeline stencil item. So when i drag the task item......it would
pickup the correct date?
hope im clear
 
A

Al Edlund

if you open the shape sheet for each of the objects you can see the user
fields that work with the addon. A little experimenting and you can easily
adopt it to your application. Remember to use the alert mechanism to control
those pesky user prompts.
al
 
J

j-in-uk

i know this question has been asked a few times but no real
answer.....how do i configure the timeline to display hours/mins
......configure milestone only has up till days
 
J

j-in-uk

yes, the scale options i get are only days,weeks,months & years....i
need hh:mm
 
A

Al Edlund

on my system they also go down to minutes and seconds, what version of visio
are you using?
al
 
J

j-in-uk

visio version is enterprise architects 10.0.2705

do u think, maybe i need to install something......or maybe some
settings to pickup hours and min
 
A

Al Edlund

you're down a version (I'm at 11 vs. 10) from me. I'm not sure if the
granularity of the addon changed between versions.
al
 
J

j-in-uk

hmmm, that's a tough one.
I'm still a bit unclear about the addon. Is this the
RUNADDONWARGS("TL","/timeline") in the actions section of the timeline
and the RUNADDONWARGS("TL","/milestone") in the actions section of the
milestone?
does this addon, allow the milestones talk to each other?
 
A

Al Edlund

not to each others. the with args is calling the addon to work with the
milestone. once the milestone is dropped it is up to the user app to keep
track of them.
al
 
J

j-in-uk

ok, thanks for your help.
i'm a bit concerned about the hours not being able to display on the
timeline for the version im using.
all my tasks are done on an hourly minute basis, if the timeline can't
configure to that, then im unable to use this..........any ideas?
 
A

Al Edlund

it becomes a program where you have to do the computations yourself to
figure out where on an object you want to start pointing. The good news is
that (as I remember) date time math in .net is based on LONG and there are a
lot of methods you can take advantage of.
al
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top