InsertionPoint and ConstraintStatus of SketchBlock

InsertionPoint and ConstraintStatus of SketchBlock

Maxim-CADman77
Advisor Advisor
266 Views
2 Replies
Message 1 of 3

InsertionPoint and ConstraintStatus of SketchBlock

Maxim-CADman77
Advisor
Advisor

Even so I do use 2D Sketch Blocks I don't like the limitation regarding possibility to add/change the insert point.

I also disturbed with fact that I never saw the fully constrained Sketch Block.

I believe the quantity of dimensions needed to fully constrain the Block depends on whether insert point was set (two for blocks without insert point and four for those with insert point).

However, when I try to determine the presence of Insert point in Block by iLogic:

Dim compDef = ThisDoc.Document.ComponentDefinition
Dim msgBody As String
For Each skbd In compDef.SketchBlockDefinitions
   msgBody &= vbLf & vbTab & skbd.Name & ", " & ".InsertPoint: " & If(skbd.InsertionPoint Is Nothing, "-", "+")
Next
msgBox(msgBody, , "Block quantity = " & compDef.SketchBlockDefinitions.Count)

 

I get the positive result even for empty blocks.

 

I create empty block performing the below steps:
1. Create new IPT-file
2. Create new 2D Sketch, create a circle, Call "Create Block" command, select the circle for Geometry and save the Block with OK button
3. Close the Sketch
4. Call Create Block command from context menu of Block node in Model Browser.
5. Run the above iLogic rule and get message with "+" in each line....

 

What I'm missing?

Please vote for Inventor-Idea Text Search within Option Names

267 Views
2 Replies
Replies (2)
Message 2 of 3

bradeneuropeArthur
Mentor
Mentor
Blocks seem to have always a default insertion point.

MsgBox (skbd.InsertionPoint.Geometry.X &" "& skbd.InsertionPoint.Geometry.Y)

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

0 Likes
Message 3 of 3

Maxim-CADman77
Advisor
Advisor

@bradeneuropeArthur 
Not sure what you mean.


Different blocks do have different coordinates of insert point:

MaximCADman77_0-1709493642952.png


 This is get with iLogic-code:

Dim compDef = ThisDoc.Document.ComponentDefinition
Dim msgBody As String
For Each skbd In compDef.SketchBlockDefinitions
	Dim insPnt = skbd.InsertionPoint.Geometry
   msgBody &= skbd.Name & ":" & vbLf & vbTab & ".InsertPoint: " & If(skbd.InsertionPoint Is Nothing, "-", "+") & vbLf & vbTab & insPnt.X & " , " & insPnt.Y & vbLf
Next
MsgBox(msgBody, , "Block quantity = " & compDef.SketchBlockDefinitions.Count)

 

On the sample attached (the above rule is embedded).

Please vote for Inventor-Idea Text Search within Option Names

0 Likes