I am trying to change the station of a sample line with code.
I could not find the property in the managed reference, but it appears to be available in the COM.
COM help under SampleLine properties:
LockToStation.. Gets or sets the boolean value that specifies whether the sample line is locked to the station.
Station ... Gets or sets the alignment station for this sample line.
In my code I set LockTostation to false then alter the station value, but ... the SampleLine station does not change.
What have I missed?
Solved! Go to Solution.
It seems you have taken the right steps. Check if you have given a valid Station value.
I have blogged a code snippet here :
Hope this helps!
Dim trans As Transaction = HostApplicationServices.WorkingDatabase.Transactio
I have now tested the code on new drawings, the code works, sample line stations update/change.. it is not working in the work drawing where I need it to work… will post when I discover the problem preventing the station change..
Aha!!! The alignment has station equations when I remove some the problem is resolved in the region without station equations ... will continue research tomoro ...
Problem located ... the station equation were 'incorrect' like this:
C3D/the API refuses to change the sample line object stations in these regions UNTIL all columns (raw station back, station back, and station ahead) have the same values - then it works .. like this ..
Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register
Start with some of our most frequented solutions to get help installing your software.