Highlight an element
Moderators: remi77, jacs, Daniel
-
- Chief
- Posts: 107
- Joined: Mon Mar 26, 2007 9:40 am
- TopSolid Module: TopSolid'Cam
- TopSolid Version: 6.26
- Location: The netherlands
- Contact:
Highlight an element
Hi,
I am looking for a way to Highlight an element or a group of elements like you use e.g. the group function inside TopSolid.
Usig this function you select one by one some elements and change color:
A alement usualy becomes red (or gray if origional color to close to red), and a shape becomes transparent. If selected a inserted component they all get selected and turn red like above.
What I want is put elements on the stack using the API and then highlight these elements.
With some help I tried to make a LIP using UWselectO, UWselectA and UWselectC. But altough it seems to run OK no highlighting appears. Does anybody has an idear?
Thanks
Mark
I am looking for a way to Highlight an element or a group of elements like you use e.g. the group function inside TopSolid.
Usig this function you select one by one some elements and change color:
A alement usualy becomes red (or gray if origional color to close to red), and a shape becomes transparent. If selected a inserted component they all get selected and turn red like above.
What I want is put elements on the stack using the API and then highlight these elements.
With some help I tried to make a LIP using UWselectO, UWselectA and UWselectC. But altough it seems to run OK no highlighting appears. Does anybody has an idear?
Thanks
Mark
Last edited by Mark Oostveen on Thu Oct 01, 2015 10:36 am, edited 1 time in total.
-
- Chief
- Posts: 107
- Joined: Mon Mar 26, 2007 9:40 am
- TopSolid Module: TopSolid'Cam
- TopSolid Version: 6.26
- Location: The netherlands
- Contact:
Re: Highlight an element
Ok
Well by analysing the group/create.lip I found out that the graphical echo on a selected element is not coming from UWselect but from the ask function.
So therefore I conclude that I cannot get the same behaviour if I want to skip the question as I have put the elements on stack using API.
Changing the attributes through API is also ( color red, transparant 5) not a solution as it is not always allowed to change these of inserted components. So if I want to highlight a element of such a component I get an error. Logic.
Anyone some other direction I can dig in to?
Grz.
Mark
Well by analysing the group/create.lip I found out that the graphical echo on a selected element is not coming from UWselect but from the ask function.
So therefore I conclude that I cannot get the same behaviour if I want to skip the question as I have put the elements on stack using API.
Changing the attributes through API is also ( color red, transparant 5) not a solution as it is not always allowed to change these of inserted components. So if I want to highlight a element of such a component I get an error. Logic.
Anyone some other direction I can dig in to?
Grz.
Mark
-
- Master Corporal
- Posts: 49
- Joined: Tue Sep 29, 2015 2:48 pm
- TopSolid Module: TopSolid'Cam
- TopSolid Version: 6.26
Re: Highlight an element
what about drawing blocks?
btw i don't know how to get the screen position of this.
i'll work on that ASAP
btw i don't know how to get the screen position of this.
i'll work on that ASAP
-
- Chief
- Posts: 107
- Joined: Mon Mar 26, 2007 9:40 am
- TopSolid Module: TopSolid'Cam
- TopSolid Version: 6.26
- Location: The netherlands
- Contact:
Re: Highlight an element
There is a function ZoomInElement so that gives you the element in the visible area of the screen.
What do you mean by drawing boxes? Like a enclosed block?
What do you mean by drawing boxes? Like a enclosed block?
-
- Master Corporal
- Posts: 49
- Joined: Tue Sep 29, 2015 2:48 pm
- TopSolid Module: TopSolid'Cam
- TopSolid Version: 6.26
Re: Highlight an element
Code: Select all
Private Sub Form1_Paint(sender As Object, e As System.Windows.Forms.PaintEventArgs) Handles Me.Paint
e.Graphics.DrawRectangle(Pens.Green, 10, 10, 200, 150)
End Sub
-
- Chief
- Posts: 107
- Joined: Mon Mar 26, 2007 9:40 am
- TopSolid Module: TopSolid'Cam
- TopSolid Version: 6.26
- Location: The netherlands
- Contact:
Re: Highlight an element
Sorry I lost you. What is this doing? How does it "highlight" an element in the graphic area of TopSolid?
-
- Master Corporal
- Posts: 49
- Joined: Tue Sep 29, 2015 2:48 pm
- TopSolid Module: TopSolid'Cam
- TopSolid Version: 6.26
Re: Highlight an element
aw, sry,
i didn't understand that to highlight an graphic object...
i did understand to highlight something on the GUI, like the Project Tree, operations Tree...
sry again!
i didn't understand that to highlight an graphic object...
i did understand to highlight something on the GUI, like the Project Tree, operations Tree...
sry again!
-
- Master Corporal
- Posts: 49
- Joined: Tue Sep 29, 2015 2:48 pm
- TopSolid Module: TopSolid'Cam
- TopSolid Version: 6.26
Re: Highlight an element
did u read about IUser Interface?
there you have some options like AskFace, Color, etc.
there you have some options like AskFace, Color, etc.
-
- Chief
- Posts: 107
- Joined: Mon Mar 26, 2007 9:40 am
- TopSolid Module: TopSolid'Cam
- TopSolid Version: 6.26
- Location: The netherlands
- Contact:
Re: Highlight an element
no, there is none... Working with V6
-
- Master Corporal
- Posts: 49
- Joined: Tue Sep 29, 2015 2:48 pm
- TopSolid Module: TopSolid'Cam
- TopSolid Version: 6.26
Re: Highlight an element
you do meaning it?
if on v6 have the GetColor and SetColor, we can do these things!
if on v6 have the GetColor and SetColor, we can do these things!
-
- Chief
- Posts: 107
- Joined: Mon Mar 26, 2007 9:40 am
- TopSolid Module: TopSolid'Cam
- TopSolid Version: 6.26
- Location: The netherlands
- Contact:
Re: Highlight an element
Buy in case of a component the attributes might be locked. Than your option does not work as it is not allowed to set the color.
But thanks for giving it a thought.
But thanks for giving it a thought.
-
- Master Corporal
- Posts: 49
- Joined: Tue Sep 29, 2015 2:48 pm
- TopSolid Module: TopSolid'Cam
- TopSolid Version: 6.26
Re: Highlight an element
are you using assembly file?
i got the shapes getting all elements then using the TopSolidHost.Elements.IsColorModifiable(ElementId), now i can manipulate these list...
i'm not using the TopSolidHost.Shapes.GetShapes(ElementId) > this returns nothing on assembly file (with components).
http://i.imgur.com/00KCvg7.png
http://i.imgur.com/6MRYaVj.png
http://i.imgur.com/9iRTYcb.png
http://i.imgur.com/jUUazvF.png
i got the shapes getting all elements then using the TopSolidHost.Elements.IsColorModifiable(ElementId), now i can manipulate these list...
i'm not using the TopSolidHost.Shapes.GetShapes(ElementId) > this returns nothing on assembly file (with components).
http://i.imgur.com/00KCvg7.png
http://i.imgur.com/6MRYaVj.png
http://i.imgur.com/9iRTYcb.png
http://i.imgur.com/jUUazvF.png
-
- Chief
- Posts: 107
- Joined: Mon Mar 26, 2007 9:40 am
- TopSolid Module: TopSolid'Cam
- TopSolid Version: 6.26
- Location: The netherlands
- Contact:
Re: Highlight an element
That's TopSolid V7. I am using TopSolid'Wood which is still in V6.