Community
Civil 3D Customization
Welcome to Autodesk’s AutoCAD Civil 3D Forums. Share your knowledge, ask questions, and explore popular AutoCAD Civil 3D Customization topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

VB.NET subassembly .Can it get its region station ?

5 REPLIES 5
Reply
Message 1 of 6
Anonymous
1112 Views, 5 Replies

VB.NET subassembly .Can it get its region station ?

I develop a subassembly using VB.NET 2005 .
It is a lane which has a crown moving from the left edge to the right edge
of the lane .
Its position is calculated using its current station .
It starts at the beginning of the region and ends at the end of the region .
It is a whole region dedicated subassembly .
But to do this I must -programmatically- get the starting and ending
stationing of the region it belongs while the subaasembly runs .
The CorridorState exposes CurrentBaselineId .But when I try to get the
object I get an error .
Is it possible to get those stations or should I set them manually through
properties ?

I tried to get them through Corridor object and C3D got stack and crashed .
I used Process explorer to end it . Obvioulsy does not work this way .
Any ideas ?



__________ Information from ESET Smart Security, version of virus signature database 4732 (20091231) __________

The message was checked by ESET Smart Security.

http://www.eset.com
5 REPLIES 5
Message 2 of 6
RickPatterson
in reply to: Anonymous

LS,

I remember trying to do a similar thing with a corridor in C3D 2008 (was VBA then) and coming to the conclusion that I could not set reference to the Baseline Alignment due to the fact that it was already referenced/open by C3D and my custom subassembly could not access it.

I ended up just setting the properties for the start and end regions manually. I looked into it briefly when the subs went to VB.net hopeful that there was a possible answer, but did not find anything to work. If you figure something out I would be interested in seeing how it could be done.

Rick
Message 3 of 6
Anonymous
in reply to: Anonymous

Hello LS,
Which version of Civil3D are you programming against? I have a sub-assembly
I'm working on now that will need to detect where it is within the region
so I can get back with you on what I find.

Thanks,
Mike

> I develop a subassembly using VB.NET 2005 .
> It is a lane which has a crown moving from the left edge to the right
> edge
> of the lane .
> Its position is calculated using its current station .
> It starts at the beginning of the region and ends at the end of the
> region .
> It is a whole region dedicated subassembly .
> But to do this I must -programmatically- get the starting and ending
> stationing of the region it belongs while the subaasembly runs .
> The CorridorState exposes CurrentBaselineId .But when I try to get the
> object I get an error .
> Is it possible to get those stations or should I set them manually
> through
> properties ?
> I tried to get them through Corridor object and C3D got stack and
> crashed .
> I used Process explorer to end it . Obvioulsy does not work this way .
> Any ideas ?
> __________ Information from ESET Smart Security, version of virus
> signature database 4732 (20091231) __________
>
> The message was checked by ESET Smart Security.
>
> http://www.eset.com
>
Message 4 of 6
Anonymous
in reply to: Anonymous

It is 2009 edition . I found no way to get them . My conclusion is this .
There is no way to programmatically get them unless the API expose them .

Ο "Michael Robertson" έγραψε στο μήνυμα
news:6330183@discussion.autodesk.com...
> Hello LS,
> Which version of Civil3D are you programming against? I have a
> sub-assembly
> I'm working on now that will need to detect where it is within the region
> so I can get back with you on what I find.
>
> Thanks,
> Mike
>
>> I develop a subassembly using VB.NET 2005 .
>> It is a lane which has a crown moving from the left edge to the right
>> edge
>> of the lane .
>> Its position is calculated using its current station .
>> It starts at the beginning of the region and ends at the end of the
>> region .
>> It is a whole region dedicated subassembly .
>> But to do this I must -programmatically- get the starting and ending
>> stationing of the region it belongs while the subaasembly runs .
>> The CorridorState exposes CurrentBaselineId .But when I try to get the
>> object I get an error .
>> Is it possible to get those stations or should I set them manually
>> through
>> properties ?
>> I tried to get them through Corridor object and C3D got stack and
>> crashed .
>> I used Process explorer to end it . Obvioulsy does not work this way .
>> Any ideas ?
>> __________ Information from ESET Smart Security, version of virus
>> signature database 4732 (20091231) __________
>>
>> The message was checked by ESET Smart Security.
>>
>> http://www.eset.com
>>
>
> __________ Information from ESET Smart Security, version of virus
> signature database 4842 (20100206) __________
>
> The message was checked by ESET Smart Security.
>
> http://www.eset.com
>
>
>

__________ Information from ESET Smart Security, version of virus signature database 4842 (20100206) __________

The message was checked by ESET Smart Security.

http://www.eset.com
Message 5 of 6
Civil3DReminders_com
in reply to: Anonymous

Using VBA outside of the subassembly code I'm able to get the baselines to work: http://blog.civil3dreminders.com/2009/01/extract-3dpolyline-from-corridor.html There may be something else wrong with your code which is causing the error.

Christopher
http://blog.civil3dreminders.com/
Civil Reminders
http://blog.civil3dreminders.com/
http://www.CivilReminders.com/
Alumni
Message 6 of 6
Anonymous
in reply to: Anonymous

The problem is how to get the starting and ending stations of the current
region while running a subassembly from within the subassembly . With either
VBA or NET it is easy to get them if it is not a subassembly .

Ο "Civil3DReminders.com" έγραψε στο μήνυμα
news:6331809@discussion.autodesk.com...
> Using VBA outside of the subassembly code I'm able to get the baselines to
> work:
> http://blog.civil3dreminders.com/2009/01/extract-3dpolyline-from-corridor.html
> There may be something else wrong with your code which is causing the
> error.
>
> Christopher
> http://blog.civil3dreminders.com/
>
> __________ Information from ESET Smart Security, version of virus
> signature database 4863 (20100213) __________
>
> The message was checked by ESET Smart Security.
>
> http://www.eset.com
>
>
>

__________ Information from ESET Smart Security, version of virus signature database 4864 (20100213) __________

The message was checked by ESET Smart Security.

http://www.eset.com

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Rail Community


 

Autodesk Design & Make Report