PowerInspect Forum
Welcome to Autodesk’s PowerInspect Forums. Share your knowledge, ask questions, and explore popular PowerInspect topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

addin or macro

0 REPLIES 0
Reply
Message 1 of 1
dsmits
492 Views, 0 Replies

addin or macro

i need to create a macro OR plugin for Autodesk Powerinspect omv (2021) in the sequence tree the macro needs to create a Userdefiend Alignment with Translation x=0.0 y=0.0 z0.0 Then create a User Defined Datums with with Translation x=0.0 y=0.0 z0.0

so far i have this

 

 

            Dim alg = power_inspect.ActiveDocument.SequenceItems.AddItem(PowerINSPECT.PWI_EntityItemType.pwi_alg_UserDefined_)
            alg.Name = "test"


            alg.Refresh()

 

 


still doing some searching on this
i tried this

Dim aPl As AlignmentUserDefined = power_inspect.ActiveDocument.ActiveItem
Dim mtb As New PWIMATHBOXLib.MathToolbox
Dim vector As New PWIMATHBOXLib.Vector3D
vector.SetCoordinates(0, 0, 1)
Dim matrix1 As New PWIMATHBOXLib.Transform
matrix1.CreateRotation(vector, 45)

Dim matrix2 As New PWIMATHBOXLib.Transform
vector.SetCoordinates(10, 20, 30)
matrix2.CreateTranslation(vector)

aPl.ParameterTransformation.matrix.Transform.CreateTranslation(vector)
alg.Refresh()
aPl.Refresh()

and it works
but if i change vector.SetCoordinates(10, 20, 30) to vector.SetCoordinates(0, 0, 0)
it doesnt

 

Figured it out...
had to do vector.SetCoordinates(0, 0, +0.00000001)



0 REPLIES 0

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

Post to forums  

Autodesk Design & Make Report