I'd better share the small sample app that we created here, too.
The app adds a button to the ribbon that allows the user to select a single object and create multiple parallels on this selected object.
The basics for creating multiple parallels is to create one multiple times:
For i = 1 To GetNumParallels()
NewObj = Exec("MapCAD.mbx","CreateParallel", OldObj, GetParallelDistance(), GetParallelOrientation(), FALSE, FALSE)
insert into sBaseTable (OBJ) Values (NewObj)
OldObj = NewObj
Next
As you can see, we have decided not to create multiple parallels on the initial object, but create a parallel on the parallel object.
This can, of course, be done in multiple ways.
I wonder if using the MapBasic function Offset() would be just as good here as using the MapCAD CreateParallel() function?
You can find the code and the compiled application in the attached file
------------------------------
Peter Horsbøll Møller
Principal Presales Consultant | Distinguished Engineer
Precisely | Trust in Data
------------------------------