Nevron Forum
Home
»
Nevron Open Vision for NET
»
NOV Diagram for .NET
»
Edit NShape.Geometry Programatically
Login
Register
Login
Register
Home
»
Nevron Open Vision for NET
»
NOV Diagram for .NET
»
Edit NShape.Geometry Programatically
Edit NShape.Geometry Programatically
Post Reply
Edit
NShape
.
Geometry
Programatically
View
Flat Ascending
Flat Descending
Threaded
Options
Subscribe to topic
Print This Topic
Goto Topics Forum
Author
Message
RLDP 2000
RLDP 2000
posted Last Year
ANSWER
Topic Details
Group: Forum Members
Posts: 11,
Visits: 385
Hi
,
May
I
ask
how
can
I
replicate
editing
Geometry
MoveTo
values
in
code
?
I
would
like
to
update
NShape
.
Geometry
without
re
-
drawing
the
whole
Geometry
sequence
.
Thank
you
for
your
support
!
Tags
NShape
NGeometry
Reply
Like
0
Nevron Support
Nevron Support
posted Last Year
ANSWER
Post Details
Group: Administrators
Posts: 3.1K,
Visits: 4.1K
Hi
,
The
following
piece
of
code
creates
a
shape
with
a
triangle
geometry
:
const
bool
CloseFigure
=
true
;
//
Create
a
shape
with
a
triangle
geometry
NShape
shape
=
new
NShape
();
shape
.
Geometry
.
AddRelative
(
new
NMoveTo
(
0
.
5
,
0
,
CloseFigure
));
shape
.
Geometry
.
AddRelative
(
new
NLineTo
(
1
,
1
));
shape
.
Geometry
.
AddRelative
(
new
NLineTo
(
0
,
1
));
shape
.
Geometry
.
AddRelative
(
new
NLineTo
(
0
.
5
,
0
));
shape
.
SetBounds
(
200
,
200
,
100
,
100
);
//
Add
the
shape
to
the
page
drawingView
.
ActivePage
.
Items
.
Add
(
shape
);
The
code
above
will
create
the
following
shape
:
You
can
then
modify
the
shape
geometry
,
for
example
you
can
change
the
third
geometry
command
like
this
:
((
NLineTo
)
shape
.
Geometry
[
2
]).
X
=
0
.
5
;
You
will
then
get
the
following
shape
:
For
more
information
on
shape
geometry
,
please
open
the
following
documentation
topic
:
Shape
Geometry
Best Regards,
Nevron Support Team
Reply
Like
1
GO
Merge Selected
Merge into selected topic...
Merge into merge target...
Merge into a specific topic ID...
Open Merge
Post Reply
Similar Topics
Post Quoted Reply
Reading This Topic
2 active, 2 guests, 0 members, 0 anonymous
No members currently viewing this topic!
Login
Login
Remember Me
Reset Password
Resend Validation Email
Login
Explore
Messages
Mentions
Search