part and assembly reference in drawing

part and assembly reference in drawing

Anonymous
Not applicable
1,654 Views
31 Replies
Message 1 of 32

part and assembly reference in drawing

Anonymous
Not applicable

ihi!

 

I wonder if it's possible to see with ilogic if a part exciste in all others view (in assembly) of the same sheet?

 

Thanks for your help!

 

0 Likes
1,655 Views
31 Replies
Replies (31)
Message 21 of 32

Anonymous
Not applicable

hi Wayne!

 

I have a error message for this entry

 

oCompDef=selObj.Parent.ModelGeometry.Parent.ComponentDefini?tion

0 Likes
Message 22 of 32

wayne.brill
Collaborator
Collaborator

Hi,

 

What is the error and what is selected? It is working for me when I select an edge of a part in a drawing view. (not an edge of an assembly in a drawing view) 

 

Thanks,

Wayne 



Wayne Brill
Developer Technical Services
Autodesk Developer Network

0 Likes
Message 23 of 32

Anonymous
Not applicable

If i selecte a edge of part in any view i have this message, i try with selection before and after the rule and same error message!

 

ERROR.JPG

0 Likes
Message 24 of 32

wayne.brill
Collaborator
Collaborator

Hi,

 

I used a translator and got this:

"End of statement expected"

 

It could be that something happened in the copying of the rule. Please attach your file with the rule so I can try to recreate the problem. I attached the .idw I am using.

 

Thanks,

Wayne



Wayne Brill
Developer Technical Services
Autodesk Developer Network

0 Likes
Message 25 of 32

Anonymous
Not applicable

is the same file test123 with your rule!

0 Likes
Message 26 of 32

wayne.brill
Collaborator
Collaborator

Hi,

 

Ok, please upload your assembly (all the files I need to recreate the error). I do not know why the error is not occurring on my system and is on yours.

 

Thanks,

 



Wayne Brill
Developer Technical Services
Autodesk Developer Network

0 Likes
Message 27 of 32

Anonymous
Not applicable

this is the file!

 

0 Likes
Message 28 of 32

wayne.brill
Collaborator
Collaborator

Hi,

 

I was able to recreate the error with the file you provided. (I got other errors about missing external rules and a missing reference too).

 

I find that if getting the ComponentDefintion is done in two steps that error was resolved. I attached the idw with this change. Does this help? 

 

Here is a code snippet with the update:

 

 

If oDoc.SelectSet.Count > 0 Then

'Get the first selected entity

selObj = oDoc.SelectSet(1)

'MessageBox.Show(TypeName(selObj), "Title")

'see if the selected entity is a DrawingCurve

If TypeName(selObj) = "DrawingCurveSegment" Then

'get the name of the file the selected DrawingCurveSegment is in

Dim oModelGeometry = selObj.Parent.ModelGeometry

Dim oCompDef

'oCompDef = selObj.Parent.ModelGeometry.Parent.ComponentDefinition

oCompDef = oModelGeometry.parent.componentdefinition

partNameToTest = oCompDef.Document.DisplayName

'MessageBox.Show(partNameToTest, "Title")

Else

 

 

 

Thanks,

Wayne

 



Wayne Brill
Developer Technical Services
Autodesk Developer Network

0 Likes
Message 29 of 32

Anonymous
Not applicable

it'S possible to save in Inventor 2013, i have this error message when i try to open your file!

 

ERROR.JPG

0 Likes
Message 30 of 32

wayne.brill
Collaborator
Collaborator

Hi,

 

Here is a 2013 file with the updated rule.

 

Thanks,

Wayne



Wayne Brill
Developer Technical Services
Autodesk Developer Network

0 Likes
Message 31 of 32

Anonymous
Not applicable

Hi Wayne!

 

All your rules work great, i retry what i want to make, this select edge of part in view, if this part exciste in all others view in sheet run another rule or enter more code!

 

Thanks for all!

0 Likes
Message 32 of 32

Anonymous
Not applicable
anybody can help me for that?
0 Likes