Thanks Laurie, I'll see if I can get these to work.
John
"Laurie" wrote in message
news:6306024@discussion.autodesk.com...
Hi John,
Depends on the language your want to use.
With VB/VBA you will have no trouble finding an INI class on the web
which you can use.
With .NET, my guess is that there would be something built in, but I
haven't time to look now.
Amongst other places it is discussed at:
http://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/4979b8e7-f985-4b9a-b5be-9111d576d250/
Regards,
Laurie Comerford
john coon wrote:
> Laurie,
>
> I never thought about using INI files, look promising. I guess I'm going
> to
> do some surfing on using INI files.
> Do you have any links/ how to's on how to use INI with C3D?
>
> Thanks Laurie.
>
> Have a great day
> John Coon
>
>
> "Laurie" wrote in message
> news:6305549@discussion.autodesk.com...
> Hi John,
>
> How do you control the erasing, redrawing and remembering settings?
>
> erasing
> Draw the inserted blocks on a specific layer not used for anything else
> Create a selection set of all objects on that layer and erase the
> selection set
>
> redrawing
> Call the same code you used to draw the blocks originally after doing the
> erase
>
> remembering
> For simple things like this I'd use an INI file - Xdata could be attached
> to
> layer 0, but it would be easily visible or editable, except by code,
> whereas
> an INI file can be easily manipulate with a text editor.
>
> An INI file could contain data like:
>
> [Alignment1_Block1]
> Alignment=MyAlignment1
> Insertion=C:\MyBlocks\Myblock.dwg
> MaxSpacingLeftSide=50
> LeftSideSpaceequally=Yes
> RightSideSpaceequally=Yes
> LeftSideOffset=5
> RightSideOffset=5
> MaxSpacingRightside=50
> LeftsideInsertAtStart=No
> LeftsideInsertAtEnd=No
> RightsideInsertAtStart=No
> RightsideInsertAtEnd=No
> LeftSideExceptionAlignment1=AnotherAlignment
> LeftSideExceptionAlignment2=YetAnotherAlignment
> LeftSideExceptionAlignment3=StillAnotherAlignment
> LeftSideAlignmentExceptionsGap=8
> RightSideExceptionAlignment1=AnotherAlignmentR
> RightSideExceptionAlignment2=YetAnotherAlignmentR
> RightSideExceptionAlignment3=StillAnotherAlignmentR
> RightSideAlignmentExceptionsGap=10
> [Alignment1_Block2]
> Alignment=MyAlignment1
> Insertion=C:\MyBlocks\MyOtherBlock.dwg
> MaxSpacingLeftSide=20
> LeftSideSpaceequally=Yes
> RightSideSpaceequally=Yes
> LeftSideOffset=3
> RightSideOffset=7
> MaxSpacingRightside=220
> LeftsideInsertAtStart=No
> LeftsideInsertAtEnd=No
> RightsideInsertAtStart=No
> RightsideInsertAtEnd=No
> LeftSideExceptionAlignment1=AnotherAlignment
> LeftSideExceptionAlignment2=YetAnotherAlignment
> LeftSideExceptionAlignment3=StillAnotherAlignment
> LeftSideAlignmentExceptionsGap=4
> RightSideExceptionAlignment1=AnotherAlignmentR
> RightSideExceptionAlignment2=YetAnotherAlignmentR
> RightSideExceptionAlignment3=StillAnotherAlignmentR
> RightSideAlignmentExceptionsGap=15
> [Alignment2_Block1]
> Alignment=MyAlignment2
> Insertion=C;\MyBlocks\MyTree.dwg
> MaxSpacingLeftSide=10
> LeftSideOffset=6
> RightSideOffset=5
> MaxSpacingRightside=10
> LeftSideSpaceequally=Yes
> RightSideSpaceequally=Yes
> LeftsideInsertAtStart=No
> LeftsideInsertAtEnd=No
> RightsideInsertAtStart=No
> RightsideInsertAtEnd=No
> LeftSideExceptionAlignment1=AnotherAlignment2
> LeftSideExceptionAlignment2=YetAnotherAlignment2
> LeftSideExceptionAlignment3=StillAnotherAlignment2
> LeftSideAlignmentExceptionsGap=8
> RightSideExceptionAlignment1=AnotherAlignmentR2
> RightSideExceptionAlignment2=YetAnotherAlignmentR2
> RightSideAlignmentExceptionsGap=10
>
> etc for each alignment/block combination.
>
> This format would allow the user to insert multiple blocks at suitable
> spacings and offsets, using the User nominated side alignment as exception
> zones.
>
>
> Regards,
>
>
> Laurie Comerford
>
>
>
>
>
>
> john coon wrote:
>
>> Laurie,
>>
>> I used the street lights as an example but you are correct about the
>> spacing.
>> my old routines looked at the dist provided and suggested the number of
>> objects
>> that could be inserted and just like the street light example it
>> sometimes
>> placed elements
>> in the road like you said. I'd have to run it again with different
>> spacing.
>>
>> That is why I was looking for a method that might incorporate the dynamic
>> feature of
>> a corridor/subassembly to control the spacing and offset. I tried dynamic
>> blocks. they worked on tangent sections
>> but could never get the curves to work out.
>>
>> The program would need to be run by the Designer, but could include to
>> remember the data so it didn't need to be picked again and to erase the
>> old drafting and redraw it.
>>
>> How do you control the erasing, redrawing and remembering settings?
>>
>> Thank Laurie, these are all good ideas.
>>
>> Have a great day,
>>
>> John Coon
>>
>>
>>
>>
>>
>>
>> "Laurie" wrote in message
>> news:6305299@discussion.autodesk.com...
>> Hi John,
>>
>> You can define a label style for an alignment which displays a block.
>> As you move the alignment around the block will move with it. Since
>> blocks can be defined with their insertion point offset from the visible
>> items you could do this for a block which appears offset fro the
>> alignment.
>>
>> However you can only have major and minor labels styles for an alignment
>> which would be quite limiting. You would also need to purpose define
>> the block to allow for specific offsets.
>>
>> In the overall scheme of things if would probably be easier to create a
>> program to deal with the insertion as street lights for example can't
>> simply be placed at uniform spacings along an alignment if that ends up
>> putting one in the middle of a side road.
>>
>> Perhaps something like a user interface allowing the Designer to:
>> nominate a block,
>> nominal (or fixed) block spacing
>> set a left offset and right offset,
>> pick starting and ending chainages (say the alignment of a
>> consecutive side street pair)
>> chainage offset from the street centrelines where no objects can be
>> drawn
>>
>> The program would need to be run by the Designer, but could include to
>> remember the data so it didn't need to be picked again and to erase the
>> old drafting and redraw it.
>>
>> These are just preliminary thoughts and still don't cover all the real
>> world possibilities.
>>
>>
>> Regards,
>>
>>
>> Laurie Comerford
>> john coon wrote:
>>
>>
>>> sorry, please read second post
>>>
>>> John
>>> "john coon" wrote in message
>>> news:6305044@discussion.autodesk.com...
>>> Is it possible to use a custom subassembly/corridor to insert blocks?
>>> I'm
>>> looking for a way to use a corridor or whatever method you suggest for
>>> the
>>> placement of blocks or object that would be dynamically linked.
>>> In the past I've used custom vba routines that connect to selected
>>> alignments and then place blocks like lights based on spacing and offset
>>> by
>>> the user. it worked but the resulting block insertion are only good as
>>> long
>>> as the alignment, offset or other values don't change. If the design did
>>> change the user would have to re-do the design and remove or relocate
>>> the
>>> old blocks.
>>>
>>> I'm looking for a method that would allow me set spacing and offset that
>>> can
>>> be linked to a corridor or alignment to insert and also update block
>>> placement if the alignment or corridor objects are updated.
>>> Point solutions are ok too.
>>>
>>> Any ideas?
>>>
>>> John Coon
>>>
>>>
>>>