Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Change Design View in IDW

21 REPLIES 21
Reply
Message 1 of 22
Anonymous
812 Views, 21 Replies

Change Design View in IDW

Can you edit a drawing view of an assembly and change the Design View via the API?
21 REPLIES 21
Message 2 of 22
Anonymous
in reply to: Anonymous

This functionality is not yet available thru the API.

Sanjay-


wrote in message news:5007894@discussion.autodesk.com...
Can you edit a drawing view of an assembly and change the Design View via
the API?
Message 3 of 22
Anonymous
in reply to: Anonymous

Is this available yet, or the ability to set the view to be associative?

Mike

"Sanjay Ramaswamy (Autodesk)" wrote in
message news:5010369@discussion.autodesk.com...
This functionality is not yet available thru the API.

Sanjay-


wrote in message news:5007894@discussion.autodesk.com...
Can you edit a drawing view of an assembly and change the Design View via
the API?
Message 4 of 22
Anonymous
in reply to: Anonymous

Yes, this is available as of R11. Look for the
DrawingView.SetDesignViewRepresentation method. The method provides an
option to specify whether you want to set the design view associatively or
not.

Sanjay-

"Mike Maenpaa" wrote in message
news:5592903@discussion.autodesk.com...
Is this available yet, or the ability to set the view to be associative?

Mike

"Sanjay Ramaswamy (Autodesk)" wrote in
message news:5010369@discussion.autodesk.com...
This functionality is not yet available thru the API.

Sanjay-


wrote in message news:5007894@discussion.autodesk.com...
Can you edit a drawing view of an assembly and change the Design View via
the API?
Message 5 of 22
Anonymous
in reply to: Anonymous

Ok, I see that in the Help examples.
What if the view has already been created, and I just want to toggle the
Associative checkbox, via a toolbar button?

Mike

"Sanjay Ramaswamy (Autodesk)" wrote in
message news:5592941@discussion.autodesk.com...
Yes, this is available as of R11. Look for the
DrawingView.SetDesignViewRepresentation method. The method provides an
option to specify whether you want to set the design view associatively or
not.

Sanjay-

"Mike Maenpaa" wrote in message
news:5592903@discussion.autodesk.com...
Is this available yet, or the ability to set the view to be associative?

Mike

"Sanjay Ramaswamy (Autodesk)" wrote in
message news:5010369@discussion.autodesk.com...
This functionality is not yet available thru the API.

Sanjay-


wrote in message news:5007894@discussion.autodesk.com...
Can you edit a drawing view of an assembly and change the Design View via
the API?
Message 6 of 22
Anonymous
in reply to: Anonymous

In order to do that, you can simply call the SetDesignViewRepresentation
method with the first input argument being the string returned by the
DrawingView.ActiveDesignViewRepresentation property (i.e. the currently used
design view) and the second argument being the 'Associative' flag.

Sanjay-

"Mike Maenpaa" wrote in message
news:5592928@discussion.autodesk.com...
Ok, I see that in the Help examples.
What if the view has already been created, and I just want to toggle the
Associative checkbox, via a toolbar button?

Mike

"Sanjay Ramaswamy (Autodesk)" wrote in
message news:5592941@discussion.autodesk.com...
Yes, this is available as of R11. Look for the
DrawingView.SetDesignViewRepresentation method. The method provides an
option to specify whether you want to set the design view associatively or
not.

Sanjay-

"Mike Maenpaa" wrote in message
news:5592903@discussion.autodesk.com...
Is this available yet, or the ability to set the view to be associative?

Mike

"Sanjay Ramaswamy (Autodesk)" wrote in
message news:5010369@discussion.autodesk.com...
This functionality is not yet available thru the API.

Sanjay-


wrote in message news:5007894@discussion.autodesk.com...
Can you edit a drawing view of an assembly and change the Design View via
the API?
Message 7 of 22
Anonymous
in reply to: Anonymous

Thanks, When I get a chance, I'll try this.

Mike


"Sanjay Ramaswamy (Autodesk)" wrote in
message news:5592918@discussion.autodesk.com...
In order to do that, you can simply call the SetDesignViewRepresentation
method with the first input argument being the string returned by the
DrawingView.ActiveDesignViewRepresentation property (i.e. the currently used
design view) and the second argument being the 'Associative' flag.

Sanjay-

"Mike Maenpaa" <> wrote in message
news:5592928@discussion.autodesk.com...
Ok, I see that in the Help examples.
What if the view has already been created, and I just want to toggle the
Associative checkbox, via a toolbar button?

Mike
Message 8 of 22
Anonymous
in reply to: Anonymous

Hi Sanjay,

I'm trying to change the view rep in a drawing view of an assembly, but i'm having type mismatch errors etc.

I'm using :-

Dim desview As DesignViewRepresentation

Desview=oSheet.DrawingViews.Item(k).SetDesignViewRepresentation("VIEW", True)

I would appreciate your help Sanjay, many thanks Dave
Message 9 of 22
Anonymous
in reply to: Anonymous

The SetDesignViewRepresentation has no return value. So the lines of code
below should be changed to the following line:

Call oSheet.DrawingViews.Item(k).SetDesignViewRepresentation("VIEW", True)

And make sure that the assembly has a design view representation named
"VIEW".

Sanjay-


wrote in message news:5620427@discussion.autodesk.com...
Hi Sanjay,

I'm trying to change the view rep in a drawing view of an assembly, but i'm
having type mismatch errors etc.

I'm using :-

Dim desview As DesignViewRepresentation

Desview=oSheet.DrawingViews.Item(k).SetDesignViewRepresentation("VIEW",
True)

I would appreciate your help Sanjay, many thanks Dave
Message 10 of 22
Anonymous
in reply to: Anonymous

Thanks Sanjay, this works fine in 11 but fails in 2008 (on the same drawing).

Call oSheet.DrawingViews.Item(k).SetDesignViewRepresentation("VIEW", True)

I'm using VB6 by the way.
Dave
Message 11 of 22
Anonymous
in reply to: Anonymous

I couldn't reproduce the problem. I'd suggest trying the same workflow via
the user interface to make sure you're doing everything right.

If you can still reproduce, could you post your drawing (and the referenced
assembly) and I can have a look.

Sanjay-

wrote in message news:5621989@discussion.autodesk.com...
Thanks Sanjay, this works fine in 11 but fails in 2008 (on the same
drawing).

Call
oSheet.DrawingViews.Item(k).SetDesignViewRepresentation("VIEW", True)

I'm using VB6 by the way.
Dave
Message 12 of 22
Anonymous
in reply to: Anonymous

Hi Sanjay,

I will do. The same code just fails without an error on 2008, but works fine with 11 on the same drawing file. If you've got error set then it re-directs as per the error. Perhaps I need to migrate the file??

Dave
Message 13 of 22
Anonymous
in reply to: Anonymous

No, a migration shouldn't be required (drawings are in fact migrated on
open). Let me know if you are able to narrow it down further.

Sanjay-

wrote in message news:5623660@discussion.autodesk.com...
Hi Sanjay,

I will do. The same code just fails without an error on 2008, but works fine
with 11 on the same drawing file. If you've got error set then it re-directs
as per the error. Perhaps I need to migrate the file??

Dave
Message 14 of 22
Anonymous
in reply to: Anonymous

I am finding that if the Associative box is not checked, then the value returned by the ActiveDesignViewRepresentation property is null. Even though when I look at the drawing view options form it has a design view selected. We have been using design views for a while, but we often forget to check the associative option. So what I want to do is get the current design view name that is being used in the view, and then set it again with the associative = True. But I can't get the design view name unless associative is already checked.
Message 15 of 22
Anonymous
in reply to: Anonymous

Any ideas on this? I have been trying to get it to work for 2 days and I can't find a way to get the name of the Design View Representation unless the associative box is checked. But the drawing view knows what design view was used because when I double click on the view, the name of the design view is still highlighted. What am I missing here?
Message 16 of 22
Anonymous
in reply to: Anonymous


Unfortunately, there isn't a way to get the "last
used" design view thru the API. As you've found, the
face="Times New Roman" size=3>ActiveDesignViewRepresentation property returns a
design view only if applied associatively.

 

Sanjay-
Message 17 of 22
Anonymous
in reply to: Anonymous

Thank you. I just wanted to make sure I wasn't missing something.
Message 18 of 22
Anonymous
in reply to: Anonymous

Hi SAnjay,

 

Is there any way to get name of designviewrepresentation in drawing view.

 

I am writing a fuction, to check if my viewrep is "Datum" (for Example), then turn on some sketches and features.

 

I tried for few days. and no luck, any help is much appriciated and Applaused.

 

Amool.

Tags (1)
Message 19 of 22
djreesing
in reply to: Anonymous

Did you try DrawingView.ActiveDesignViewRepresentation?

 

Daniël

Message 20 of 22
Anonymous
in reply to: djreesing

Hello Sanjay,

 

Yes, I did. used watch window as well to look if it is in anyother property.

 

But no luck. IS there any other method??

 

Amul.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report