Trying to change the element created from "copy parallel"

Trying to change the element created from "copy parallel"

Post by moll.. » Mon, 30 Oct 2000 05:19:42



I'm trying to change the element created from "copy parallel" in a
macro. The macro prompts the user for the distance, the user selects the
element to copy parallel, the user selects the offset side, and the
macro copies the element parallel that distance. I want to then take
that new element and change its elevation without having to make
anymore selections. I'm able to get the file position of the new element
but can't seem to be able to do anything with it.

I get the new elements file position by using
"filePos=MbeDgnInfo.endOfFile" before the copying the element. I then
tried,
    offsetPos = element2.fromFile(filepos)
    MbeSendCommand "move element"
    MbeLocateElement offsetPos,offsetPos,0,offsetpoint
    MbeSendDataPoint offsetpoint
    MbeSendCommand "dl=0,0,-3"
    stat = element2.rewrite()

I've tried many combinations of the above and have read the help files.
I'm sure I'm missing something very simple but I'm just not seeing it. I
thought I was starting to get a hang of writing macros. I have a long
way to go.

I'd appreciate any help. Thanks in advance.

Molly

Sent via Deja.com http://www.deja.com/
Before you buy.

 
 
 

Trying to change the element created from "copy parallel"

Post by Dave Presto » Mon, 30 Oct 2000 06:47:06


A couple of things spring to mind:-

1. Would offsetpoint pick a point on the new element ?. (You could use
MbeElement.getendpoints(offsetpoint), assuming it is a linear element.

2. You don't need the MbeSendDatapoint and the Mbesendcommand "dl=..." line,
as the MbeLocate Element acts as the first datapoint. I would be tempted to
use the  MbeLocate, then set offsetpoint.x = offsetpoint.x - 3, then
MbeSendDatapooint offsetpoint.

3. the element.rewrite does nothing as you have used a MicroStation command,
rather than an MS Basic method / property to modify the element.

I f you'r still stuck, post again.

--
Regards
Dave Preston.
Software Development Engineer
C.A.Design Services Ltd

www  : www.cadesign.demon.co.uk


> I'm trying to change the element created from "copy parallel" in a
> macro. The macro prompts the user for the distance, the user selects the
> element to copy parallel, the user selects the offset side, and the
> macro copies the element parallel that distance. I want to then take
> that new element and change its elevation without having to make
> anymore selections. I'm able to get the file position of the new element
> but can't seem to be able to do anything with it.

> I get the new elements file position by using
> "filePos=MbeDgnInfo.endOfFile" before the copying the element. I then
> tried,
>     offsetPos = element2.fromFile(filepos)
>     MbeSendCommand "move element"
>     MbeLocateElement offsetPos,offsetPos,0,offsetpoint
>     MbeSendDataPoint offsetpoint
>     MbeSendCommand "dl=0,0,-3"
>     stat = element2.rewrite()

> I've tried many combinations of the above and have read the help files.
> I'm sure I'm missing something very simple but I'm just not seeing it. I
> thought I was starting to get a hang of writing macros. I have a long
> way to go.

> I'd appreciate any help. Thanks in advance.

> Molly

> Sent via Deja.com http://www.deja.com/
> Before you buy.


 
 
 

Trying to change the element created from "copy parallel"

Post by moll.. » Mon, 30 Oct 2000 10:54:47


Dave you're awesome!!!!!!!

Thankyou very much for your suggestions.

Quote:> 2. You don't need the MbeSendDatapoint and the Mbesendcommand "dl=..."
line,
> as the MbeLocate Element acts as the first datapoint. I would be
tempted to
> use the  MbeLocate, then set offsetpoint.x = offsetpoint.x - 3, then
> MbeSendDatapooint offsetpoint.

The end result will be able to prompt the user for the difference in
elevation and look something like this.

    offsetPos = element2.fromFile(filepos)
    MbeSendCommand "move element"
    MbeLocateElement offsetPos,offsetPos,0,offsetpoint
    offsetpoint.z=offsetpoint.z-num
    MbeSendDataPoint offsetpoint

Thanks again. That brickwall that I kept running into was giving me a
headache. I can now go get a glass of wine and toast you.

Enjoy the weekend.

Molly

Sent via Deja.com http://www.deja.com/
Before you buy.

 
 
 

Trying to change the element created from "copy parallel"

Post by Dave Presto » Mon, 30 Oct 2000 17:41:35


I can remember the initial pain of this type of thing. Unfortunately, it
doesn't stop. It just becomes a different problem.
I'll join you with a glass. Cheers.

--
Regards
Dave Preston.
Software Development Engineer
C.A.Design Services Ltd

www  : www.cadesign.demon.co.uk


> Dave you're awesome!!!!!!!

> Thankyou very much for your suggestions.
> > 2. You don't need the MbeSendDatapoint and the Mbesendcommand "dl=..."
> line,
> > as the MbeLocate Element acts as the first datapoint. I would be
> tempted to
> > use the  MbeLocate, then set offsetpoint.x = offsetpoint.x - 3, then
> > MbeSendDatapooint offsetpoint.

> The end result will be able to prompt the user for the difference in
> elevation and look something like this.

>     offsetPos = element2.fromFile(filepos)
>     MbeSendCommand "move element"
>     MbeLocateElement offsetPos,offsetPos,0,offsetpoint
>     offsetpoint.z=offsetpoint.z-num
>     MbeSendDataPoint offsetpoint

> Thanks again. That brickwall that I kept running into was giving me a
> headache. I can now go get a glass of wine and toast you.

> Enjoy the weekend.

> Molly

> Sent via Deja.com http://www.deja.com/
> Before you buy.

 
 
 

Trying to change the element created from "copy parallel"

Post by Paulo Lim » Tue, 31 Oct 2000 18:48:30


I have a macro that does what intend
if you want a copy sendme a mail .



Quote:> I'm trying to change the element created from "copy parallel" in a
> macro. The macro prompts the user for the distance, the user selects the
> element to copy parallel, the user selects the offset side, and the
> macro copies the element parallel that distance. I want to then take
> that new element and change its elevation without having to make
> anymore selections. I'm able to get the file position of the new element
> but can't seem to be able to do anything with it.

> I get the new elements file position by using
> "filePos=MbeDgnInfo.endOfFile" before the copying the element. I then
> tried,
>     offsetPos = element2.fromFile(filepos)
>     MbeSendCommand "move element"
>     MbeLocateElement offsetPos,offsetPos,0,offsetpoint
>     MbeSendDataPoint offsetpoint
>     MbeSendCommand "dl=0,0,-3"
>     stat = element2.rewrite()

> I've tried many combinations of the above and have read the help files.
> I'm sure I'm missing something very simple but I'm just not seeing it. I
> thought I was starting to get a hang of writing macros. I have a long
> way to go.

> I'd appreciate any help. Thanks in advance.

> Molly

> Sent via Deja.com http://www.deja.com/
> Before you buy.

 
 
 

1. """"*****"""""""******""""PLEASE HELP"""""******""""""******

Sorry about the asterixes, but I'm getting desperate, does anyone know how
to interpret the LWPOLYLINE entity in R14. I have written a program to
interpret a DXF file, but I have no description for the LWPOLYLINE. If you
have the manuals, I think it's in appendix C. I hope someone out there can
help me

Dale Atkin

newsgroups)

2. Help wanted with HTML help Workshop 1.1

3. """""""""""Services in Archicad and Autocad""""""""""""

4. another newbie question about pointers

5. """""""""Offer - drawing in archicad and autocad""""""""""""

6. Supra external 9600 modem $45.00 / BO

7. """""Services in archicad and autocad"""""

8. """""""""""Services in Archicad and Autocad"""""""""

9. """ LATEST SOFTWARE """"

10. change the "/" character to "feet"

11. wildfire: "select by menu" - " last feat" or "feat number" etc...???