Constraining JPG Logo in a title block

Constraining JPG Logo in a title block

tahdesign1
Collaborator Collaborator
3,640 Views
12 Replies
Message 1 of 13

Constraining JPG Logo in a title block

tahdesign1
Collaborator
Collaborator

So for years our borders have had an imported AutoCAD outline that is hatch filed for the company logo.
I am redoing our borders with inserted (not linked) jpg's in them.
The only issue that I have is that there really is no way to contrain the image in the title block definition.
I can size it and move it around but not contrain it.
So what I did was to make a rectangular box the size and position that I want the logo to be in.
I then size the jpg image to as close to this visually as I can and center it on the rectangle.
It is the last part I put in so it seems to stay put.
However I would much rather contrain this to where I want it.
Any one have any suggestion for this?

0 Likes
3,641 Views
12 Replies
Replies (12)
Message 2 of 13

brendan.henderson
Advisor
Advisor

It's a missing link in the dwg/idw and in sketched symbols. Roughly locating the image is as good as you can get, for now.

 

I created an IdeaStation entry for this exact issue. Give it a vote if you want it fixed.

Brendan Henderson
CAD Manager


New Blog | Old Blog | Google+ | Twitter


Inventor 2016 PDSU Build 236, Release 2016.2.2, Vault Professional 2016 Update 1, Win 7 64 bit


Please use "Accept as Solution" & give "Kudos" if this response helped you.

Message 3 of 13

tahdesign1
Collaborator
Collaborator

I assume by vote you mean give Kudos, which I did.

 

Nice use of snagit to illustrate the issue also.

 

I actually got an email yesterday that a support case had been issued for this and someone on the development team would be contacting me.

I am assuming at to say "nope you can do that at this point".

0 Likes
Message 4 of 13

Vladimir.Ananyev
Alumni
Alumni

There is no API to constrain inserted image 😞 but it is not difficult to simplify logo insertion with iLogic .

The following external iLogic rule embeds specified logo (bmp-file) into the title block definition.  You may specify both position and image size. 

Coordinates should be defined

  • in the base length units (cm) and
  • in the sketch coordinate system.

Look at this video to see how the rule works:

https://chronicle.autodesk.com/Main/Details/73f9f5e2-014b-4928-931f-79f6a7c258d8

 

'This rule embeds Logo image into title block definition
'Image position and size are specified.
Sub Main
    'check if the active document is drawing document
    If Not TypeOf(ThisDoc.Document) Is DrawingDocument Then        
        MessageBox.Show("Run this rule when Drawings document is active", _
            "Logo", MessageBoxButtons.OK, MessageBoxIcon.Asterisk, _
            MessageBoxDefaultButton.Button1)
        Exit Sub
    End If
    
    '1) define full path to the Logo image
    Dim LogoFilename As String = "c:\Temp\RulerCorp.bmp"
    
    '2) specify Logo image size -  0.62in x 0.62in
    '   Use cantimeters! - Inventor internal units 
    Dim LogoHeight As Double = 0.62*2.54  'in cm
    Dim LogoWidth  As Double = LogoHeight 
    
    '3) specify insertion point coordinates  X = 7.75in, Y = 7.45in
    '   Use cantimeters! - Inventor internal units 
    '   Sketch coordinate system is used.
    Dim InsPointX As Double = 7.75*2.54  'in cm
    Dim InsPointY As Double = 7.45*2.54  'in cm
    
    '4) the final step - insert Logo
    InsertImage(LogoFilename,InsPointX,InsPointY, LogoWidth, LogoHeight)
    
    Beep 'could be removed 
End Sub


Sub InsertImage( _
        LogoFilename As String, _
        InsPointX    As Double, _
        InsPointY    As Double, _
        LogoWidth    As Double, _ 
        LogoHeight   As Double)
    
    Dim oDoc As DrawingDocument = ThisDoc.Document
    
    'set target point in the title block sketch coordinates (in cm)
    Dim oPoint As Point2d = ThisApplication.TransientGeometry _
        .CreatePoint2d(InsPointX, InsPointY)
    
    Dim oTitleBlockDef As TitleBlockDefinition _
            = oDoc.ActiveSheet.TitleBlock.Definition
    
    Dim oSketch As DrawingSketch
    Call oTitleBlockDef.Edit(oSketch)
    Dim oSketchImage As SketchImage 
    'add embedded image
    oSketchImage = oSketch.SketchImages.Add(LogoFilename, oPoint, False)
    'set image size in cm
    oSketchImage.Height = LogoHeight
    oSketchImage.Width  = LogoWidth        
    oTitleBlockDef.ExitEdit
    
End Sub  'InsertImage

 Cheers,


Vladimir Ananyev
Developer Technical Services
Autodesk Developer Network

0 Likes
Message 5 of 13

tahdesign1
Collaborator
Collaborator

OK even though that may work in my opinion that is a patch not a solution.

I want my IDW templates to be standalone not dependant on iLogic to insert a logo from an external location.

I want to insert an image (jpg) without linking it and then size and position it as I see fit.

It appears you can do this in a part sketch but not in a title block sketch.

0 Likes
Message 6 of 13

Vladimir.Ananyev
Alumni
Alumni

Of course, this is a patch. But I’m not sure that understand your workflow properly.


>> I want my IDW templates to be standalone not dependent on iLogic to insert a logo from an external location.

If your IDW template is standalone and is not dependent on the image from the external location then does it mean that this logo is already inserted into the title block definition? How often do you need to change logos (they should be rather stable)? How many templates do you need to support?


>> I want to insert an image (jpg) without linking it and then size and position it as I see fit.

Provided iLogic rule produces embedded (not linked to file) image. Link to external file is also possible (just change Faulse to True).

Do you really want to change size and position manually?

Available format: bmp

Best regards,


Vladimir Ananyev
Developer Technical Services
Autodesk Developer Network

0 Likes
Message 7 of 13

tahdesign1
Collaborator
Collaborator

Basically what we asking for is to have the same ability to deal with images in a title block sketch as you have in a part sketch.

 

In a part sketch you can use the bounding box to size and locate the image (see attached).

 

We should have the same ability in a title block sketch.

Message 8 of 13

Vladimir.Ananyev
Alumni
Alumni

This wish is already published by Brendan Henderson in the Inventor IdeaStation.  This functionality should be first implemented in the product.  

Best regards,


Vladimir Ananyev
Developer Technical Services
Autodesk Developer Network

0 Likes
Message 9 of 13

Thermeco-Cad
Enthusiast
Enthusiast

This post goes back to nearly 2 years now and I cannot constrain my logo precisely in title block with bloody 2016!!!

Instead of changing the look of Inventor do something valuable. We pay subscription and expect something decent like make the engine turbo rather than changing the car's colour. It's just getting slower and slower...

 

Message 10 of 13

Anonymous
Not applicable

And another year, has this been resolved?  Work on redoing my companies title blocks as we change Inventor versions, wondering if i can expect to see this fixed.

 

If important things are going to be ignored every year, then why do a yearly release?  Go back to the old release pattern.

Message 11 of 13

nick.barbour
Contributor
Contributor

Just came in looking for a solution to this same issue.

I'm trying to constrain an image of a company logo in an adaptive drg template.

Is there still no constraint option?

Message 12 of 13

Anonymous
Not applicable

2020 version now. Still waiting for this easy yet vital fix.

Message 13 of 13

BrandonBG
Collaborator
Collaborator

Please continue voting for the above mentioned Idea Station item:

https://forums.autodesk.com/t5/inventor-ideas/add-constraints-for-an-image-in-a-sketched-symbol/idi-... 

0 Likes